Calls
List calls, newest first
GET /v1/calls calls:read
Calls in this API key's environment. Every filter is optional; they combine with AND. The cursor pages through the same filters.
Query
limitintegercursorstringfromstringCalls started at or after this time, ISO 8601
tostringCalls started before this time, ISO 8601
direction"inbound" | "outbound"Only inbound or outbound calls
statusone of severalAny of these statuses (queued, ringing, in_progress, completed, busy, no_answer, failed, canceled): repeat the parameter, use
status[], or separate with commasnumberstringThe from or to number: an E.164 prefix (
+1415), or digits that start the number after its + or end it (0100). Spaces, dashes and brackets are ignoredrepIdstringCalls the rep (
rep_…) placed, answered from a queue, or recorded the disposition ofqueuestringCalls that visited this queue, by name
dispositionstringCalls with this disposition
flowstringCalls that ran this call flow, by name
simulated"true" | "false"true: only calls on the simulated carrier (test mode);false: only real ones
Responses
- 200
A page of calls
Fields
-
dataCall[] requiredFields
-
idstring required -
direction"inbound" | "outbound" required -
status"queued" | "ringing" | "in_progress" | "completed" | "busy" | "no_answer" | "failed" | "canceled" required -
fromstring required -
tostring required -
phoneNumberIdstring | null required -
agentIdstring | null required -
environment"live" | "test" requiredtestcalls run on the simulated carrier and never reach a phone -
startedAtstring | null required -
answeredAtstring | null required -
endedAtstring | null required -
durationSecondsinteger | null required -
flowstring | null requiredThe call flow this call runs, if any
-
flowVersionstring | null requiredThe flow version the call started with
-
dispositionstring | null requiredSet by the flow's
hangup({ disposition }), or a rep's wrap-up -
repIdstring | null requiredA rep outbound call: the rep it was placed for
-
contextanyA rep outbound call: its
context -
outcome"completed" | "rep_unavailable" | "busy" | "no_answer" | "failed" | "cancelled" | "voicemail_left" | null requiredHow a rep outbound call ended:
completed,rep_unavailable(the rep never answered, the customer was not dialed),busy,no_answer,failedorcancelled. On a campaign's call:voicemail_left, whenonVoicemailleft a message on a machine
-
-
nextCursorstring | null required
-
- 400
Invalid request
- 401
Missing or invalid API key
- 404
Not found
- 429
rate_limited, or another limit named byerror.code
Place an outbound call
POST /v1/calls calls:write
Every call is checked before anything rings, and audited. A number on the Do Not Call list is a 422 do_not_call. Without repId, a call outside 8:00 to 21:00 in the time zone of the number's lead, or else the timezone you give, is a 422 outside_calling_hours. With neither zone the call is placed, and audited as not checked.
Headers
Idempotency-KeystringMakes the request safe to retry. For 24h, a request with the same key and body replays the stored response (with
Idempotent-Replayed: true); the same key with a different request is a 422idempotency_key_reused, and while the first request is still running a 409idempotency_key_in_use. Server errors, 409s and 429s are not stored.
Body
-
fromstringOne of the tenant numbers. Required, except with
repId: then it defaults to the rep's caller ID, the workspace's, or the first number. -
tostring required -
recordingfalsefalse: this call is not recorded, whatever the recording policy says. It can only turn recording off. -
timezonestringThe callee's IANA time zone, for the calling hours check (8:00 to 21:00). Used when no lead with this number has one: a lead's zone comes first. With neither the call is placed, and audited as not checked. Not with
repId. -
instructionsobject[]Call Instructions to run once the call is answered. Give this or
agentId.Fields
say
-
type"say" required -
textstring required -
voicestring -
languagestring
play
-
type"play" required -
urlstring required -
loopinteger1 to 100.
pause
-
type"pause" required -
secondsinteger required1 to 60.
connectAgent
-
type"connectAgent" required -
agentIdstring required -
providerstring -
variablesobject
dial
-
type"dial" required -
tostring required -
callerIdstring -
timeoutSecondsinteger5 to 600.
-
recordboolean
enqueue
-
type"enqueue" required -
queuestring required
gather
-
type"gather" required -
input"dtmf" | "speech"[] required -
numDigitsinteger1 to 32.
-
timeoutSecondsinteger1 to 60.
-
promptobjectFields
-
type"say" required -
textstring required -
voicestring -
languagestring
-
-
tagstring -
sensitiveboolean
record
-
type"record" required -
maxLengthSecondsinteger1 to 14400.
hangup
-
type"hangup" required -
dispositionstring -
callbackAtinteger
-
-
agentIdstringShorthand for
instructions: [{ type: "connectAgent", agentId, variables }]: ouragt_…id or the platform agent id. Give this orinstructions. -
variablesobjectDynamic variables for the agent; only with
agentId. -
flowstringRun this registered call flow: its handlers drive the call. Give this,
instructionsoragentId. The API key picks the environment (live or test). -
inputobjectThe flow's input, checked against the schema it registered; only with
flow. -
repIdstringPlace the call for this rep (click-to-call): the rep's softphone rings first, and the customer is dialed once they answer. Not with
instructions,agentIdorflow. Refusals: 409rep_busy/rep_offline, 422caller_id_not_owned,no_caller_id,do_not_call, 409conflict(no softphone). -
contextanyWith
repId: up to 4 KB of JSON kept on the call and its events.
Responses
- 201
Call created
Fields
-
dataCall requiredFields
-
idstring required -
direction"inbound" | "outbound" required -
status"queued" | "ringing" | "in_progress" | "completed" | "busy" | "no_answer" | "failed" | "canceled" required -
fromstring required -
tostring required -
phoneNumberIdstring | null required -
agentIdstring | null required -
environment"live" | "test" requiredtestcalls run on the simulated carrier and never reach a phone -
startedAtstring | null required -
answeredAtstring | null required -
endedAtstring | null required -
durationSecondsinteger | null required -
flowstring | null requiredThe call flow this call runs, if any
-
flowVersionstring | null requiredThe flow version the call started with
-
dispositionstring | null requiredSet by the flow's
hangup({ disposition }), or a rep's wrap-up -
repIdstring | null requiredA rep outbound call: the rep it was placed for
-
contextanyA rep outbound call: its
context -
outcome"completed" | "rep_unavailable" | "busy" | "no_answer" | "failed" | "cancelled" | "voicemail_left" | null requiredHow a rep outbound call ended:
completed,rep_unavailable(the rep never answered, the customer was not dialed),busy,no_answer,failedorcancelled. On a campaign's call:voicemail_left, whenonVoicemailleft a message on a machine
-
-
- 400
Invalid request
- 401
Missing or invalid API key
- 404
Not found
- 409
idempotency_key_in_use: a request with this key is still running - 422
The connectAgent target is disabled or removed, or
idempotency_key_reused - 429
rate_limited, or another limit named byerror.code
Get a call
GET /v1/calls/{id} calls:read
Path
idstring required
Responses
- 200
The call
Fields
-
dataCall requiredFields
-
idstring required -
direction"inbound" | "outbound" required -
status"queued" | "ringing" | "in_progress" | "completed" | "busy" | "no_answer" | "failed" | "canceled" required -
fromstring required -
tostring required -
phoneNumberIdstring | null required -
agentIdstring | null required -
environment"live" | "test" requiredtestcalls run on the simulated carrier and never reach a phone -
startedAtstring | null required -
answeredAtstring | null required -
endedAtstring | null required -
durationSecondsinteger | null required -
flowstring | null requiredThe call flow this call runs, if any
-
flowVersionstring | null requiredThe flow version the call started with
-
dispositionstring | null requiredSet by the flow's
hangup({ disposition }), or a rep's wrap-up -
repIdstring | null requiredA rep outbound call: the rep it was placed for
-
contextanyA rep outbound call: its
context -
outcome"completed" | "rep_unavailable" | "busy" | "no_answer" | "failed" | "cancelled" | "voicemail_left" | null requiredHow a rep outbound call ended:
completed,rep_unavailable(the rep never answered, the customer was not dialed),busy,no_answer,failedorcancelled. On a campaign's call:voicemail_left, whenonVoicemailleft a message on a machine
-
-
- 400
Invalid request
- 401
Missing or invalid API key
- 404
Not found
- 429
rate_limited, or another limit named byerror.code
Hang up a live call
POST /v1/calls/{id}/hangup calls:write
Path
idstring required
Headers
Idempotency-KeystringMakes the request safe to retry. For 24h, a request with the same key and body replays the stored response (with
Idempotent-Replayed: true); the same key with a different request is a 422idempotency_key_reused, and while the first request is still running a 409idempotency_key_in_use. Server errors, 409s and 429s are not stored.
Responses
- 200
Hangup requested
Fields
-
dataCall requiredFields
-
idstring required -
direction"inbound" | "outbound" required -
status"queued" | "ringing" | "in_progress" | "completed" | "busy" | "no_answer" | "failed" | "canceled" required -
fromstring required -
tostring required -
phoneNumberIdstring | null required -
agentIdstring | null required -
environment"live" | "test" requiredtestcalls run on the simulated carrier and never reach a phone -
startedAtstring | null required -
answeredAtstring | null required -
endedAtstring | null required -
durationSecondsinteger | null required -
flowstring | null requiredThe call flow this call runs, if any
-
flowVersionstring | null requiredThe flow version the call started with
-
dispositionstring | null requiredSet by the flow's
hangup({ disposition }), or a rep's wrap-up -
repIdstring | null requiredA rep outbound call: the rep it was placed for
-
contextanyA rep outbound call: its
context -
outcome"completed" | "rep_unavailable" | "busy" | "no_answer" | "failed" | "cancelled" | "voicemail_left" | null requiredHow a rep outbound call ended:
completed,rep_unavailable(the rep never answered, the customer was not dialed),busy,no_answer,failedorcancelled. On a campaign's call:voicemail_left, whenonVoicemailleft a message on a machine
-
-
- 400
Invalid request
- 401
Missing or invalid API key
- 404
Not found
- 409
idempotency_key_in_use: a request with this key is still running - 422
idempotency_key_reused: this key was used with a different request - 429
rate_limited, or another limit named byerror.code
Replace the instructions of a live call
POST /v1/calls/{id}/instructions calls:write
Path
idstring required
Headers
Idempotency-KeystringMakes the request safe to retry. For 24h, a request with the same key and body replays the stored response (with
Idempotent-Replayed: true); the same key with a different request is a 422idempotency_key_reused, and while the first request is still running a 409idempotency_key_in_use. Server errors, 409s and 429s are not stored.
Body
-
instructionsobject[] requiredFields
say
-
type"say" required -
textstring required -
voicestring -
languagestring
play
-
type"play" required -
urlstring required -
loopinteger1 to 100.
pause
-
type"pause" required -
secondsinteger required1 to 60.
connectAgent
-
type"connectAgent" required -
agentIdstring required -
providerstring -
variablesobject
dial
-
type"dial" required -
tostring required -
callerIdstring -
timeoutSecondsinteger5 to 600.
-
recordboolean
enqueue
-
type"enqueue" required -
queuestring required
gather
-
type"gather" required -
input"dtmf" | "speech"[] required -
numDigitsinteger1 to 32.
-
timeoutSecondsinteger1 to 60.
-
promptobjectFields
-
type"say" required -
textstring required -
voicestring -
languagestring
-
-
tagstring -
sensitiveboolean
record
-
type"record" required -
maxLengthSecondsinteger1 to 14400.
hangup
-
type"hangup" required -
dispositionstring -
callbackAtinteger
-
Responses
- 200
Call redirected
Fields
-
dataCall requiredFields
-
idstring required -
direction"inbound" | "outbound" required -
status"queued" | "ringing" | "in_progress" | "completed" | "busy" | "no_answer" | "failed" | "canceled" required -
fromstring required -
tostring required -
phoneNumberIdstring | null required -
agentIdstring | null required -
environment"live" | "test" requiredtestcalls run on the simulated carrier and never reach a phone -
startedAtstring | null required -
answeredAtstring | null required -
endedAtstring | null required -
durationSecondsinteger | null required -
flowstring | null requiredThe call flow this call runs, if any
-
flowVersionstring | null requiredThe flow version the call started with
-
dispositionstring | null requiredSet by the flow's
hangup({ disposition }), or a rep's wrap-up -
repIdstring | null requiredA rep outbound call: the rep it was placed for
-
contextanyA rep outbound call: its
context -
outcome"completed" | "rep_unavailable" | "busy" | "no_answer" | "failed" | "cancelled" | "voicemail_left" | null requiredHow a rep outbound call ended:
completed,rep_unavailable(the rep never answered, the customer was not dialed),busy,no_answer,failedorcancelled. On a campaign's call:voicemail_left, whenonVoicemailleft a message on a machine
-
-
- 400
Invalid request
- 401
Missing or invalid API key
- 404
Not found
- 409
idempotency_key_in_use: a request with this key is still running - 422
The connectAgent target is disabled or removed, or
idempotency_key_reused - 429
rate_limited, or another limit named byerror.code
Say what a rep is told of the AI agent's conversation
POST /v1/calls/{id}/ai-summary calls:write
Shown on the offer, the call and the wrap-up, from the answer on: a desk that has the call fills in. A flow's outbound call has no session until it's answered, and before that this is refused (409). It beats the agent platform's own summary. For agents with no post-call report, such as SIP, this and aiSummary on a transfer are the only way one gets to a rep.
Path
idstring required
Body
-
textstring requiredWhat the rep is told of the AI agent's conversation. Cut to 2 KB.
Responses
- 200
Set
Fields
-
dataAiSummarySet requiredFields
-
appliedboolean requiredWhether this is now what reps see. Blank text changes nothing.
-
-
- 400
Invalid request
- 401
Missing or invalid API key
- 404
Not found
- 429
rate_limited, or another limit named byerror.code
Send a custom event to a live call's flow
POST /v1/calls/{id}/events calls:write
Delivers { name, payload } to the call flow's .on(name) handler, synchronously within the flow's timeout. Actions the handler returns are applied to the call.
Path
idstring required
Headers
Idempotency-KeystringMakes the request safe to retry. For 24h, a request with the same key and body replays the stored response (with
Idempotent-Replayed: true); the same key with a different request is a 422idempotency_key_reused, and while the first request is still running a 409idempotency_key_in_use. Server errors, 409s and 429s are not stored.
Body
-
namestring required -
payloadany
Responses
- 202
Delivered
Fields
-
dataEmittedCallEvent requiredFields
-
idstring requiredThe flow event id (stable across our retries)
-
appliedboolean requiredWhether the handler returned actions we applied
-
-
- 400
Invalid request
- 401
Missing or invalid API key
- 404
Not found
- 409
The call has no flow or has ended
- 429
rate_limited, or another limit named byerror.code
Start a consult: the customer goes on hold while the target rings
POST /v1/calls/{id}/consults calls:write
repId must be a Rep on the call (409 otherwise). A queue must be registered (404), and a number on the Do Not Call list is refused (409). While a consult is live, a second consult, a transfer, hold, keypad tones and a supervisor taking over are refused (409).
Path
idstring required
Body
-
repIdstring requiredThe Rep on the call who is consulting
-
targetobject requiredFields
rep
-
type"rep" required -
repIdstring required
queue
-
type"queue" required -
queuestring required
number
-
type"number" required -
tostring required
-
Responses
- 201
The consult
Fields
-
dataConsult requiredA Rep's consult on a call: the customer is on hold while the Rep talks to a Rep, queue or number, then hands over (
complete), comes back (cancel) or brings everyone together (merge).Fields
-
idstring required -
callIdstring required -
status"dialing" | "consulting" | "merged" | "ended" required -
targetobject required -
repIdstring required -
targetRepIdstring | null required -
transferIdstring | null required -
outcome"completed" | "canceled" | "target_failed" | "target_left" | "caller_left" | null required -
reason"busy" | "no_answer" | "failed" | "unavailable" | "queue_overflow" | "queue_closed" | "queue_outside_hours" | "rep_unavailable" | null required -
startedAtstring required -
connectedAtstring | null required -
mergedAtstring | null required -
endedAtstring | null required
-
-
- 400
Invalid request
- 401
Missing or invalid API key
- 404
Not found
- 409
The call or consult is not in a state to do this
- 429
rate_limited, or another limit named byerror.code
Read a consult
GET /v1/consults/{id} calls:read
Path
idstring required
Responses
- 200
The consult
Fields
-
dataConsult requiredA Rep's consult on a call: the customer is on hold while the Rep talks to a Rep, queue or number, then hands over (
complete), comes back (cancel) or brings everyone together (merge).Fields
-
idstring required -
callIdstring required -
status"dialing" | "consulting" | "merged" | "ended" required -
targetobject required -
repIdstring required -
targetRepIdstring | null required -
transferIdstring | null required -
outcome"completed" | "canceled" | "target_failed" | "target_left" | "caller_left" | null required -
reason"busy" | "no_answer" | "failed" | "unavailable" | "queue_overflow" | "queue_closed" | "queue_outside_hours" | "rep_unavailable" | null required -
startedAtstring required -
connectedAtstring | null required -
mergedAtstring | null required -
endedAtstring | null required
-
-
- 400
Invalid request
- 401
Missing or invalid API key
- 404
Not found
- 429
rate_limited, or another limit named byerror.code
Hand over: the customer comes off hold, then the Rep leaves
POST /v1/consults/{id}/complete calls:write
Path
idstring required
Responses
- 200
The consult
Fields
-
dataConsult requiredA Rep's consult on a call: the customer is on hold while the Rep talks to a Rep, queue or number, then hands over (
complete), comes back (cancel) or brings everyone together (merge).Fields
-
idstring required -
callIdstring required -
status"dialing" | "consulting" | "merged" | "ended" required -
targetobject required -
repIdstring required -
targetRepIdstring | null required -
transferIdstring | null required -
outcome"completed" | "canceled" | "target_failed" | "target_left" | "caller_left" | null required -
reason"busy" | "no_answer" | "failed" | "unavailable" | "queue_overflow" | "queue_closed" | "queue_outside_hours" | "rep_unavailable" | null required -
startedAtstring required -
connectedAtstring | null required -
mergedAtstring | null required -
endedAtstring | null required
-
-
- 400
Invalid request
- 401
Missing or invalid API key
- 404
Not found
- 409
The call or consult is not in a state to do this
- 429
rate_limited, or another limit named byerror.code
Back to the caller: the target leaves, the customer comes off hold
POST /v1/consults/{id}/cancel calls:write
Path
idstring required
Responses
- 200
The consult
Fields
-
dataConsult requiredA Rep's consult on a call: the customer is on hold while the Rep talks to a Rep, queue or number, then hands over (
complete), comes back (cancel) or brings everyone together (merge).Fields
-
idstring required -
callIdstring required -
status"dialing" | "consulting" | "merged" | "ended" required -
targetobject required -
repIdstring required -
targetRepIdstring | null required -
transferIdstring | null required -
outcome"completed" | "canceled" | "target_failed" | "target_left" | "caller_left" | null required -
reason"busy" | "no_answer" | "failed" | "unavailable" | "queue_overflow" | "queue_closed" | "queue_outside_hours" | "rep_unavailable" | null required -
startedAtstring required -
connectedAtstring | null required -
mergedAtstring | null required -
endedAtstring | null required
-
-
- 400
Invalid request
- 401
Missing or invalid API key
- 404
Not found
- 409
The call or consult is not in a state to do this
- 429
rate_limited, or another limit named byerror.code
Bring everyone together: the customer comes off hold, and nobody leaves
POST /v1/consults/{id}/merge calls:write
Path
idstring required
Responses
- 200
The consult
Fields
-
dataConsult requiredA Rep's consult on a call: the customer is on hold while the Rep talks to a Rep, queue or number, then hands over (
complete), comes back (cancel) or brings everyone together (merge).Fields
-
idstring required -
callIdstring required -
status"dialing" | "consulting" | "merged" | "ended" required -
targetobject required -
repIdstring required -
targetRepIdstring | null required -
transferIdstring | null required -
outcome"completed" | "canceled" | "target_failed" | "target_left" | "caller_left" | null required -
reason"busy" | "no_answer" | "failed" | "unavailable" | "queue_overflow" | "queue_closed" | "queue_outside_hours" | "rep_unavailable" | null required -
startedAtstring required -
connectedAtstring | null required -
mergedAtstring | null required -
endedAtstring | null required
-
-
- 400
Invalid request
- 401
Missing or invalid API key
- 404
Not found
- 409
The call or consult is not in a state to do this
- 429
rate_limited, or another limit named byerror.code