Overview
Initiate a new outbound phone call using an AI agent. The agent will automatically handle the conversation based on its configuration.
Request Body
Phone number to call in E.164 format (e.g., +1234567890)
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. Required if agent_id is not provided.
Optional webhook URL to receive call completion notifications. Must be a valid HTTP/HTTPS URL.
Optional external call ID for tracking purposes.
Optional input parameters as JSON string to pass to the agent.
Optional output parameters template as JSON string to extract structured data from the conversation.
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"
}'
Response
Whether the request was successful
Unique identifier for the call
Current status of the call. Initially RINGING when call is initiated.
Example Response
{
"success": true,
"call_id": "12345",
"status": "RINGING",
"message": "Call initiated successfully"
}
Error Responses
Human-readable error message
Error code. Possible values: MISSING_PARAMS, AGENT_NOT_FOUND, INSUFFICIENT_BALANCE, INTERNAL_ERROR
Webhooks
If you provide a webhook_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.API key authentication. Include your API key in the Authorization header as: Bearer YOUR_API_KEY
Phone number to call (E.164 format, e.g., +1234567890)
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
Call initiated successfully
Whether the request was successful
Unique identifier for the call
Current status of the call
Available options:
IDLE,
RINGING,
IN_PROGRESS,
COMPLETED,
FAILED