Initiate outbound call
curl --request POST \
--url https://api.call24x7.ai/outbound_call \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"to_phone_number": "<string>",
"call_id": "<string>",
"agent_id": "<string>",
"instruction": "<string>",
"webhook_url": "<string>",
"external_call_id": "<string>",
"input_parameters": "<string>",
"output_parameters": "<string>"
}
'import requests
url = "https://api.call24x7.ai/outbound_call"
payload = {
"to_phone_number": "<string>",
"call_id": "<string>",
"agent_id": "<string>",
"instruction": "<string>",
"webhook_url": "<string>",
"external_call_id": "<string>",
"input_parameters": "<string>",
"output_parameters": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
to_phone_number: '<string>',
call_id: '<string>',
agent_id: '<string>',
instruction: '<string>',
webhook_url: '<string>',
external_call_id: '<string>',
input_parameters: '<string>',
output_parameters: '<string>'
})
};
fetch('https://api.call24x7.ai/outbound_call', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.call24x7.ai/outbound_call",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'to_phone_number' => '<string>',
'call_id' => '<string>',
'agent_id' => '<string>',
'instruction' => '<string>',
'webhook_url' => '<string>',
'external_call_id' => '<string>',
'input_parameters' => '<string>',
'output_parameters' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.call24x7.ai/outbound_call"
payload := strings.NewReader("{\n \"to_phone_number\": \"<string>\",\n \"call_id\": \"<string>\",\n \"agent_id\": \"<string>\",\n \"instruction\": \"<string>\",\n \"webhook_url\": \"<string>\",\n \"external_call_id\": \"<string>\",\n \"input_parameters\": \"<string>\",\n \"output_parameters\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.call24x7.ai/outbound_call")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"to_phone_number\": \"<string>\",\n \"call_id\": \"<string>\",\n \"agent_id\": \"<string>\",\n \"instruction\": \"<string>\",\n \"webhook_url\": \"<string>\",\n \"external_call_id\": \"<string>\",\n \"input_parameters\": \"<string>\",\n \"output_parameters\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.call24x7.ai/outbound_call")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"to_phone_number\": \"<string>\",\n \"call_id\": \"<string>\",\n \"agent_id\": \"<string>\",\n \"instruction\": \"<string>\",\n \"webhook_url\": \"<string>\",\n \"external_call_id\": \"<string>\",\n \"input_parameters\": \"<string>\",\n \"output_parameters\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"call_id": "<string>",
"status": "IDLE",
"message": "<string>"
}{
"success": false,
"message": "<string>",
"error_code": "MISSING_PARAMS"
}{
"success": false,
"message": "<string>",
"error_code": "MISSING_PARAMS"
}{
"success": false,
"message": "<string>",
"error_code": "MISSING_PARAMS"
}{
"success": false,
"message": "<string>",
"error_code": "MISSING_PARAMS"
}API Endpoints
Make Outbound Call
Initiate a new outbound phone call using an AI agent. The agent will handle the conversation automatically.
POST
/
outbound_call
Initiate outbound call
curl --request POST \
--url https://api.call24x7.ai/outbound_call \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"to_phone_number": "<string>",
"call_id": "<string>",
"agent_id": "<string>",
"instruction": "<string>",
"webhook_url": "<string>",
"external_call_id": "<string>",
"input_parameters": "<string>",
"output_parameters": "<string>"
}
'import requests
url = "https://api.call24x7.ai/outbound_call"
payload = {
"to_phone_number": "<string>",
"call_id": "<string>",
"agent_id": "<string>",
"instruction": "<string>",
"webhook_url": "<string>",
"external_call_id": "<string>",
"input_parameters": "<string>",
"output_parameters": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
to_phone_number: '<string>',
call_id: '<string>',
agent_id: '<string>',
instruction: '<string>',
webhook_url: '<string>',
external_call_id: '<string>',
input_parameters: '<string>',
output_parameters: '<string>'
})
};
fetch('https://api.call24x7.ai/outbound_call', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.call24x7.ai/outbound_call",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'to_phone_number' => '<string>',
'call_id' => '<string>',
'agent_id' => '<string>',
'instruction' => '<string>',
'webhook_url' => '<string>',
'external_call_id' => '<string>',
'input_parameters' => '<string>',
'output_parameters' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.call24x7.ai/outbound_call"
payload := strings.NewReader("{\n \"to_phone_number\": \"<string>\",\n \"call_id\": \"<string>\",\n \"agent_id\": \"<string>\",\n \"instruction\": \"<string>\",\n \"webhook_url\": \"<string>\",\n \"external_call_id\": \"<string>\",\n \"input_parameters\": \"<string>\",\n \"output_parameters\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.call24x7.ai/outbound_call")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"to_phone_number\": \"<string>\",\n \"call_id\": \"<string>\",\n \"agent_id\": \"<string>\",\n \"instruction\": \"<string>\",\n \"webhook_url\": \"<string>\",\n \"external_call_id\": \"<string>\",\n \"input_parameters\": \"<string>\",\n \"output_parameters\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.call24x7.ai/outbound_call")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"to_phone_number\": \"<string>\",\n \"call_id\": \"<string>\",\n \"agent_id\": \"<string>\",\n \"instruction\": \"<string>\",\n \"webhook_url\": \"<string>\",\n \"external_call_id\": \"<string>\",\n \"input_parameters\": \"<string>\",\n \"output_parameters\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"call_id": "<string>",
"status": "IDLE",
"message": "<string>"
}{
"success": false,
"message": "<string>",
"error_code": "MISSING_PARAMS"
}{
"success": false,
"message": "<string>",
"error_code": "MISSING_PARAMS"
}{
"success": false,
"message": "<string>",
"error_code": "MISSING_PARAMS"
}{
"success": false,
"message": "<string>",
"error_code": "MISSING_PARAMS"
}Overview
Initiate a new outbound phone call using an AI agent. The agent will automatically handle the conversation based on its configuration.Request Body
string
required
Phone number to call in E.164 format (e.g., +1234567890)
string
ID of the AI agent to use for the call. Required if
instruction is not provided.string
AI agent instruction/prompt. Used to create a temporary agent if
agent_id is not provided. Required if agent_id is not provided.string
Optional webhook URL to receive call completion notifications. Must be a valid HTTP/HTTPS URL.
string
Optional external call ID for tracking purposes.
string
Optional input parameters as JSON string to pass to the agent.
string
Optional output parameters template as JSON string to extract structured data from the conversation.
string
Existing call ID to retrieve status for. If provided, a new call will not be created.
Example Request
curl -X POST https://api.call24x7.ai/outbound_call \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to_phone_number": "+1234567890",
"agent_id": "agent-123"
}'
curl -X POST https://api.call24x7.ai/outbound_call \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to_phone_number": "+1234567890",
"agent_id": "agent-123",
"webhook_url": "https://your-app.com/webhooks/call-complete",
"external_call_id": "order-12345"
}'
curl -X POST https://api.call24x7.ai/outbound_call \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to_phone_number": "+1234567890",
"instruction": "You are a friendly customer service representative calling to confirm an appointment."
}'
Response
boolean
Whether the request was successful
string
Unique identifier for the call
string
Current status of the call. Initially
RINGING when call is initiated.string
Response message
Example Response
{
"success": true,
"call_id": "12345",
"status": "RINGING",
"message": "Call initiated successfully"
}
Error Responses
boolean
Always
false for errorsstring
Human-readable error message
string
Error code. Possible values:
MISSING_PARAMS, AGENT_NOT_FOUND, INSUFFICIENT_BALANCE, INTERNAL_ERRORWebhooks
If you provide awebhook_url, you’ll receive a POST request when the call completes with the following data:
{
"call_id": "12345",
"status": "COMPLETED",
"call_direction": "outbound",
"from_phone_number": "+1234567890",
"to_phone_number": "+0987654321",
"agent_id": "agent-123",
"duration_seconds": 180,
"recording_url": "https://...",
"transcription": "Full call transcription...",
"output_parameters": "{\"appointment_scheduled\": true}"
}
Billing
Calls are billed at $0.15 per minute with precise second-by-second billing. Ensure your account has sufficient balance before making calls.Authorizations
API key authentication. Include your API key in the Authorization header as: Bearer YOUR_API_KEY
Body
application/json
Call request parameters
Phone number to call (E.164 format, e.g., +1234567890)
Pattern:
^\+[1-9]\d{1,14}$Existing call ID to retrieve status for
ID of the AI agent to use for the call. Required if instruction is not provided.
AI agent instruction/prompt. Used to create a temporary agent if agent_id is not provided.
Optional webhook URL to receive call completion notifications
Optional external call ID for tracking
Optional input parameters as JSON string
Optional output parameters template as JSON string

