Place a call
POST/v1/profiles/{profile_id}/calls
- Scope
calls:write Idempotency-Keyrequired
Calls to from the line's number; when they answer, connects your voice agent (endpoint_id) or a teammate's app (user_id). US and Canada only; emergency numbers never.
Idempotency: the Idempotency-Key header is required, like sends: a retry with the same key answers 200 with the same call and never places a second one.
Parameters
Path
profile_idstringrequiredThe line (
prf_…).
Request body
tostringrequiredThe number to call: US or Canada, any common format.
endpoint_idstringConnect your voice agent (
vep_…) when they answer. Give this oruser_id.user_idstringRing a teammate's app (
usr_…) and connect them when they answer. Give this orendpoint_id.timeout_secondsintegerHow long to ring, 5–60 seconds.
Response
200 OKA retry with the same Idempotency-Key: the same call.
idstringrequiredcal_…object"call"requiredprofile_idstringrequiredprf_…direction"inbound" | "outbound"requiredoriginstringrequiredpstn(an outside caller),browser,api,sip(your voice agent dialed out) ortest.fromstring or nullrequiredtostring or nullrequiredremote_numberstring or nullrequiredThe other party's number.
chat_idstring or nullrequiredThe chat with the same person, if there is one.
statusstringrequiredqueued,ringing,in_progress,completed,busy,no_answer,failedorcanceled.handled_bystring or nullrequireduser:usr_…,voice_ai:vep_…,number:+1…,voicemailorteam.endpoint_idstring or nullrequiredstarted_attimestamp or nullrequiredanswered_attimestamp or nullrequiredended_attimestamp or nullrequiredduration_secinteger or nullrequiredbillable_minutesinteger or nullrequiredRounded up per call.
voicemailobject or nullrequiredA voicemail left on the call:
GETitsurlwith your key for the audio.Fields of
voicemailurlstringrequiredduration_secinteger or nullrequiredtranscriptionstring or nullrequiredstoredbooleanrequired
transfersarray of objectrequiredFields of
transferstostringrequiredbystringrequiredatstringrequired
errorobject or nullrequiredFields of
errorcodestringrequiredmessagestring or nullrequired
created_attimestamprequired
201 CreatedThe call, ringing.
idstringrequiredcal_…object"call"requiredprofile_idstringrequiredprf_…direction"inbound" | "outbound"requiredoriginstringrequiredpstn(an outside caller),browser,api,sip(your voice agent dialed out) ortest.fromstring or nullrequiredtostring or nullrequiredremote_numberstring or nullrequiredThe other party's number.
chat_idstring or nullrequiredThe chat with the same person, if there is one.
statusstringrequiredqueued,ringing,in_progress,completed,busy,no_answer,failedorcanceled.handled_bystring or nullrequireduser:usr_…,voice_ai:vep_…,number:+1…,voicemailorteam.endpoint_idstring or nullrequiredstarted_attimestamp or nullrequiredanswered_attimestamp or nullrequiredended_attimestamp or nullrequiredduration_secinteger or nullrequiredbillable_minutesinteger or nullrequiredRounded up per call.
voicemailobject or nullrequiredA voicemail left on the call:
GETitsurlwith your key for the audio.Fields of
voicemailurlstringrequiredduration_secinteger or nullrequiredtranscriptionstring or nullrequiredstoredbooleanrequired
transfersarray of objectrequiredFields of
transferstostringrequiredbystringrequiredatstringrequired
errorobject or nullrequiredFields of
errorcodestringrequiredmessagestring or nullrequired
created_attimestamprequired
Errors
| Status | Code | Means |
|---|---|---|
| 400 | idempotency_key_required | A send or call came without an Idempotency-Key header. |
| 409 | idempotency_key_reused | The Idempotency-Key was used before for a different request. Nothing was sent. |
| 403 | emergency_number_blocked | Emergency and N11 numbers can't be called from a line. |
| 403 | destination_not_allowed | Calls go to US and Canadian numbers only. |
| 402 | calling_not_subscribed | The line doesn't have Calling on its plan. |
| 402 | spending_cap_reached | The team has used its calling minutes for the month. |
| 403 | fair_use_paused | Outgoing calls on this line are paused for the month (fair use). |
| 409 | caller_id_unverified | Calling on the line is still being set up. |
| 409 | calling_not_set_up | The line has no calling. |
| 400 | validation_failed | A field is missing or invalid. |
| 401 | unauthorized | The API key is missing, unknown or revoked. |
| 403 | insufficient_scope | The API key lacks the scope this needs. |
| 404 | not_found | No such object, or the key can't see it. |
Every error is { "error": { "code", "message" } }. All error codes.