Initiate an outbound call
curl --request POST \
--url https://example.com/api/v1/project/{projectSlug}/{env}/outbound-calls \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"channelConnectionId": "cc_01a09438",
"to": {
"type": "phone",
"number": "+14155550123"
},
"idempotencyKey": "order-4821-attempt-1",
"clientReferenceId": "order-4821",
"amdMode": "off"
}
'{
"success": true,
"data": {
"outboundCallId": "<string>",
"phase": "accepted",
"initiationState": "created"
}
}{
"success": true,
"data": {
"outboundCallId": "oc_01a0a4af5a417f5186af",
"phase": "accepted",
"initiationState": "submitted"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}Place outbound calls
Place an outbound call through a channel connection, with idempotent retries and optional answering-machine detection.
POST
/
api
/
v1
/
project
/
{projectSlug}
/
{env}
/
outbound-calls
Initiate an outbound call
curl --request POST \
--url https://example.com/api/v1/project/{projectSlug}/{env}/outbound-calls \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"channelConnectionId": "cc_01a09438",
"to": {
"type": "phone",
"number": "+14155550123"
},
"idempotencyKey": "order-4821-attempt-1",
"clientReferenceId": "order-4821",
"amdMode": "off"
}
'{
"success": true,
"data": {
"outboundCallId": "<string>",
"phase": "accepted",
"initiationState": "created"
}
}{
"success": true,
"data": {
"outboundCallId": "oc_01a0a4af5a417f5186af",
"phase": "accepted",
"initiationState": "submitted"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}outboundCallId, the initial phase (accepted), and the initiationState. The request needs the outbound_calls.initiate scope.
Returns 201 on a genuinely new call. Repeating the exact same idempotencyKey and body returns 200 with the original call instead of placing a duplicate one. Reusing a key with a different body returns 409 IDEMPOTENCY_CONFLICT.
The request requires channelConnectionId, to, and idempotencyKey. Set to to a phone number in E.164 format or to a SIP URI. Optional fields are clientReferenceId to correlate the call with your own records, amdMode (off, continue, or disconnect) for answering-machine detection, and sessionMetadata to attach to the session that starts when the call connects. A 502 error means the call could not be submitted to the telephony provider. If the error code is OUTBOUND_PROVIDER_REQUEST_UNKNOWN, check the call’s initiationState shortly after instead of resubmitting. To track the call, use Look up a call by ID or Events of outbound calls.Authorizations
Path Parameters
Body
application/json
Was this page helpful?