Skip to navigation

Originate outbound call

View as Markdown

Start an outbound call and return its new session_uuid after the request is admitted. A 202 Accepted response confirms only admission; it does not confirm that the destination rang or answered. Call progress and completion are reported through webhooks.

Triggered webhooks: session.created, session.ringing_started, session.answered, and session.ended. The optional session.early_media_started event reports early media.

See Session lifecycle events for complete payload schemas and examples.

Authentication

AuthorizationBearer

Send Authorization: Bearer <app_uuid>:<api_key> using an active API key. See Authentication for details.

Headers

Idempotency-KeystringOptionalformat: "^[a-zA-Z0-9._-]*$"<=128 characters

Optional key for safely retrying mutating requests. An explicitly empty header is treated like omission and does not enable replay protection. See Idempotency for details.

Request

This endpoint expects an object.
fromstringRequiredformat: "^\+[1-9]\d{1,14}$"

Caller ID to present, in the same E.164 format with leading + as to (e.g. +972500000000). The schema validates canonical syntax only. Runtime country policy must support the number, and it must be on the app’s caller-ID allow-list or match the caller ID of a live inbound phone Session supplied in caller_id_session_uuid. An unauthorized value is rejected with 403 forbidden (no call is placed, no webhooks fire). Branch on the response code, not the human message. The platform does not substitute a default caller ID; an SDK MAY catch 403 forbidden for this operation and retry with its own configured approved default.

max_duration_secintegerRequired1-14400
Maximum total call duration in seconds. A typical value is 3600.
ring_timeout_secintegerRequired1-300

Pre-answer ring timeout in seconds, measured from when the outbound session is created, before the dial command is dispatched. It is NOT measured from when the destination phone starts ringing. Call setup and routing consume part of this budget, so the callee experiences less ring time than the value set here. On expiry the dial ends with session.ended (answered=false, hangup_cause=“timeout”). Distinct from max_duration_sec, the post-answer cap.

tostringRequiredformat: "^\+[1-9]\d{1,14}$"

Destination number in international E.164 format with leading + (e.g. +972500000000). The schema validates canonical syntax only. Runtime country and trunk policies determine whether the destination is currently dialable; an unsupported destination is rejected with 400 invalid_request.

caller_id_session_uuidstringOptional

Live inbound phone Session from this app whose caller ID exactly matches from.

trunk_idstringOptional

Use this eligible outbound trunk instead of automatic lowest-price selection.

Response headers

traceparentstringOptionalformat: "^00-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$"=55 characters

Server-owned W3C Trace Context for correlating this response with support and observability data. It is present on successful and error responses. A valid incoming traceparent is linked to, but never becomes, the server-owned trace identifier.

Response

Dial accepted
session_uuidstring
Session identifier.
statusenum
Allowed values:

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
406
Not Acceptable Error
409
Conflict Error
413
Content Too Large Error
415
Unsupported Media Type Error
422
Unprocessable Entity Error
429
Too Many Requests Error
500
Internal Server Error
503
Service Unavailable Error