Simulator
The simulated number, the numbers and test flows you can call, and the limits
GET /v1/simulator simulator:write
Responses
- 200
OK
Fields
-
dataSimulatorInfo requiredFields
-
simulatedNumberstring required -
numbersobject[] required -
flowsobject[] required -
limitsobject required
-
-
- 400
Invalid request
- 401
Missing or invalid API key
- 403
A live key (
test_mode_only): the simulator runs in test mode only - 404
Not found
- 429
rate_limited, or another limit named byerror.code
List simulated calls (kept for 24 hours)
GET /v1/simulator/calls simulator:write
Responses
- 200
OK
Fields
-
dataSimulatedCall[] requiredFields
-
idstring required -
direction"inbound" | "outbound" required -
fromstring required -
tostring required -
status"queued" | "ringing" | "in_progress" | "completed" | "busy" | "no_answer" | "failed" | "canceled" required -
startedAtstring required -
endedAtstring | null required -
legsSimulatedLeg[] required -
promptobject requiredThe open gather the far end is asked to answer
-
agentobject requiredThe simulated AI agent on the call, which you play
-
-
- 400
Invalid request
- 401
Missing or invalid API key
- 403
A live key (
test_mode_only): the simulator runs in test mode only - 404
Not found
- 429
rate_limited, or another limit named byerror.code
Start a simulated inbound call to one of your numbers
POST /v1/simulator/calls simulator:write
Body
-
tostring requiredOne of your numbers, or the simulated number
-
fromstringThe caller; a fixed test number by default
-
flowstringA flow deployed to test; by default the number’s flow, or the only one
Responses
- 201
OK
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
- 403
A live key (
test_mode_only): the simulator runs in test mode only - 404
Not found
- 429
rate_limited, or another limit named byerror.code
A simulated call as the simulator sees it: legs, the open prompt, the agent
GET /v1/simulator/calls/{id} simulator:write
Path
idstring required
Responses
- 200
OK
Fields
-
dataSimulatedCall requiredFields
-
idstring required -
direction"inbound" | "outbound" required -
fromstring required -
tostring required -
status"queued" | "ringing" | "in_progress" | "completed" | "busy" | "no_answer" | "failed" | "canceled" required -
startedAtstring required -
endedAtstring | null required -
legsSimulatedLeg[] required -
promptobject requiredThe open gather the far end is asked to answer
-
agentobject requiredThe simulated AI agent on the call, which you play
-
-
- 400
Invalid request
- 401
Missing or invalid API key
- 403
A live key (
test_mode_only): the simulator runs in test mode only - 404
Not found
- 429
rate_limited, or another limit named byerror.code
Everything that happened on a simulated call, in order
GET /v1/simulator/calls/{id}/timeline simulator:write
Path
idstring required
Responses
- 200
OK
Fields
-
dataSimulatorTimelineEntry[] requiredFields
-
idstring required -
seqinteger required -
atstring required -
actor"hcc" | "caller" | "callee" | "agent" | "rep" | "supervisor" | "system" required -
kindstring required -
textstring required -
dataany -
legstring | null required
-
-
- 400
Invalid request
- 401
Missing or invalid API key
- 403
A live key (
test_mode_only): the simulator runs in test mode only - 404
Not found
- 429
rate_limited, or another limit named byerror.code
Press keys: answers the open prompt
POST /v1/simulator/calls/{id}/digits simulator:write
Path
idstring required
Body
-
digitsstring required
Responses
- 200
OK
Fields
-
dataSimulatedCall requiredFields
-
idstring required -
direction"inbound" | "outbound" required -
fromstring required -
tostring required -
status"queued" | "ringing" | "in_progress" | "completed" | "busy" | "no_answer" | "failed" | "canceled" required -
startedAtstring required -
endedAtstring | null required -
legsSimulatedLeg[] required -
promptobject requiredThe open gather the far end is asked to answer
-
agentobject requiredThe simulated AI agent on the call, which you play
-
-
- 400
Invalid request
- 401
Missing or invalid API key
- 403
A live key (
test_mode_only): the simulator runs in test mode only - 404
Not found
- 429
rate_limited, or another limit named byerror.code
Say something: answers the open prompt as speech
POST /v1/simulator/calls/{id}/speech simulator:write
Path
idstring required
Body
-
textstring required
Responses
- 200
OK
Fields
-
dataSimulatedCall requiredFields
-
idstring required -
direction"inbound" | "outbound" required -
fromstring required -
tostring required -
status"queued" | "ringing" | "in_progress" | "completed" | "busy" | "no_answer" | "failed" | "canceled" required -
startedAtstring required -
endedAtstring | null required -
legsSimulatedLeg[] required -
promptobject requiredThe open gather the far end is asked to answer
-
agentobject requiredThe simulated AI agent on the call, which you play
-
-
- 400
Invalid request
- 401
Missing or invalid API key
- 403
A live key (
test_mode_only): the simulator runs in test mode only - 404
Not found
- 429
rate_limited, or another limit named byerror.code
Act as the far end of a leg: answer
POST /v1/simulator/calls/{id}/answer simulator:write
Path
idstring required
Body
-
legstringThe leg to act on (
SC…); by default the far end
Responses
- 200
OK
Fields
-
dataSimulatedCall requiredFields
-
idstring required -
direction"inbound" | "outbound" required -
fromstring required -
tostring required -
status"queued" | "ringing" | "in_progress" | "completed" | "busy" | "no_answer" | "failed" | "canceled" required -
startedAtstring required -
endedAtstring | null required -
legsSimulatedLeg[] required -
promptobject requiredThe open gather the far end is asked to answer
-
agentobject requiredThe simulated AI agent on the call, which you play
-
-
- 400
Invalid request
- 401
Missing or invalid API key
- 403
A live key (
test_mode_only): the simulator runs in test mode only - 404
Not found
- 429
rate_limited, or another limit named byerror.code
Act as the far end of a leg: machine
POST /v1/simulator/calls/{id}/machine simulator:write
Path
idstring required
Body
-
legstringThe leg to act on (
SC…); by default the far end
Responses
- 200
OK
Fields
-
dataSimulatedCall requiredFields
-
idstring required -
direction"inbound" | "outbound" required -
fromstring required -
tostring required -
status"queued" | "ringing" | "in_progress" | "completed" | "busy" | "no_answer" | "failed" | "canceled" required -
startedAtstring required -
endedAtstring | null required -
legsSimulatedLeg[] required -
promptobject requiredThe open gather the far end is asked to answer
-
agentobject requiredThe simulated AI agent on the call, which you play
-
-
- 400
Invalid request
- 401
Missing or invalid API key
- 403
A live key (
test_mode_only): the simulator runs in test mode only - 404
Not found
- 429
rate_limited, or another limit named byerror.code
Act as the far end of a leg: greeting
POST /v1/simulator/calls/{id}/greeting simulator:write
Path
idstring required
Body
-
legstringThe leg to act on (
SC…); by default the far end
Responses
- 200
OK
Fields
-
dataSimulatedCall requiredFields
-
idstring required -
direction"inbound" | "outbound" required -
fromstring required -
tostring required -
status"queued" | "ringing" | "in_progress" | "completed" | "busy" | "no_answer" | "failed" | "canceled" required -
startedAtstring required -
endedAtstring | null required -
legsSimulatedLeg[] required -
promptobject requiredThe open gather the far end is asked to answer
-
agentobject requiredThe simulated AI agent on the call, which you play
-
-
- 400
Invalid request
- 401
Missing or invalid API key
- 403
A live key (
test_mode_only): the simulator runs in test mode only - 404
Not found
- 429
rate_limited, or another limit named byerror.code
Act as the far end of a leg: greeting-end
POST /v1/simulator/calls/{id}/greeting-end simulator:write
Path
idstring required
Body
-
legstringThe leg to act on (
SC…); by default the far end
Responses
- 200
OK
Fields
-
dataSimulatedCall requiredFields
-
idstring required -
direction"inbound" | "outbound" required -
fromstring required -
tostring required -
status"queued" | "ringing" | "in_progress" | "completed" | "busy" | "no_answer" | "failed" | "canceled" required -
startedAtstring required -
endedAtstring | null required -
legsSimulatedLeg[] required -
promptobject requiredThe open gather the far end is asked to answer
-
agentobject requiredThe simulated AI agent on the call, which you play
-
-
- 400
Invalid request
- 401
Missing or invalid API key
- 403
A live key (
test_mode_only): the simulator runs in test mode only - 404
Not found
- 429
rate_limited, or another limit named byerror.code
Act as the far end of a leg: busy
POST /v1/simulator/calls/{id}/busy simulator:write
Path
idstring required
Body
-
legstringThe leg to act on (
SC…); by default the far end
Responses
- 200
OK
Fields
-
dataSimulatedCall requiredFields
-
idstring required -
direction"inbound" | "outbound" required -
fromstring required -
tostring required -
status"queued" | "ringing" | "in_progress" | "completed" | "busy" | "no_answer" | "failed" | "canceled" required -
startedAtstring required -
endedAtstring | null required -
legsSimulatedLeg[] required -
promptobject requiredThe open gather the far end is asked to answer
-
agentobject requiredThe simulated AI agent on the call, which you play
-
-
- 400
Invalid request
- 401
Missing or invalid API key
- 403
A live key (
test_mode_only): the simulator runs in test mode only - 404
Not found
- 429
rate_limited, or another limit named byerror.code
Act as the far end of a leg: no-answer
POST /v1/simulator/calls/{id}/no-answer simulator:write
Path
idstring required
Body
-
legstringThe leg to act on (
SC…); by default the far end
Responses
- 200
OK
Fields
-
dataSimulatedCall requiredFields
-
idstring required -
direction"inbound" | "outbound" required -
fromstring required -
tostring required -
status"queued" | "ringing" | "in_progress" | "completed" | "busy" | "no_answer" | "failed" | "canceled" required -
startedAtstring required -
endedAtstring | null required -
legsSimulatedLeg[] required -
promptobject requiredThe open gather the far end is asked to answer
-
agentobject requiredThe simulated AI agent on the call, which you play
-
-
- 400
Invalid request
- 401
Missing or invalid API key
- 403
A live key (
test_mode_only): the simulator runs in test mode only - 404
Not found
- 429
rate_limited, or another limit named byerror.code
Act as the far end of a leg: fail
POST /v1/simulator/calls/{id}/fail simulator:write
Path
idstring required
Body
-
legstringThe leg to act on (
SC…); by default the far end
Responses
- 200
OK
Fields
-
dataSimulatedCall requiredFields
-
idstring required -
direction"inbound" | "outbound" required -
fromstring required -
tostring required -
status"queued" | "ringing" | "in_progress" | "completed" | "busy" | "no_answer" | "failed" | "canceled" required -
startedAtstring required -
endedAtstring | null required -
legsSimulatedLeg[] required -
promptobject requiredThe open gather the far end is asked to answer
-
agentobject requiredThe simulated AI agent on the call, which you play
-
-
- 400
Invalid request
- 401
Missing or invalid API key
- 403
A live key (
test_mode_only): the simulator runs in test mode only - 404
Not found
- 429
rate_limited, or another limit named byerror.code
Act as the far end of a leg: hangup
POST /v1/simulator/calls/{id}/hangup simulator:write
Path
idstring required
Body
-
legstringThe leg to act on (
SC…); by default the far end
Responses
- 200
OK
Fields
-
dataSimulatedCall requiredFields
-
idstring required -
direction"inbound" | "outbound" required -
fromstring required -
tostring required -
status"queued" | "ringing" | "in_progress" | "completed" | "busy" | "no_answer" | "failed" | "canceled" required -
startedAtstring required -
endedAtstring | null required -
legsSimulatedLeg[] required -
promptobject requiredThe open gather the far end is asked to answer
-
agentobject requiredThe simulated AI agent on the call, which you play
-
-
- 400
Invalid request
- 401
Missing or invalid API key
- 403
A live key (
test_mode_only): the simulator runs in test mode only - 404
Not found
- 429
rate_limited, or another limit named byerror.code
Play the AI agent: call one of its tools through the flow’s tool path
POST /v1/simulator/calls/{id}/agent/tool simulator:write
Path
idstring required
Body
-
namestring required -
argumentsobjectDefault
{}.
Responses
- 200
OK
Fields
-
dataSimulatedCall requiredFields
-
idstring required -
direction"inbound" | "outbound" required -
fromstring required -
tostring required -
status"queued" | "ringing" | "in_progress" | "completed" | "busy" | "no_answer" | "failed" | "canceled" required -
startedAtstring required -
endedAtstring | null required -
legsSimulatedLeg[] required -
promptobject requiredThe open gather the far end is asked to answer
-
agentobject requiredThe simulated AI agent on the call, which you play
-
-
- 400
Invalid request
- 401
Missing or invalid API key
- 403
A live key (
test_mode_only): the simulator runs in test mode only - 404
Not found
- 429
rate_limited, or another limit named byerror.code
Play the AI agent: say something to the caller
POST /v1/simulator/calls/{id}/agent/say simulator:write
Path
idstring required
Body
-
textstring required
Responses
- 200
OK
Fields
-
dataSimulatedCall requiredFields
-
idstring required -
direction"inbound" | "outbound" required -
fromstring required -
tostring required -
status"queued" | "ringing" | "in_progress" | "completed" | "busy" | "no_answer" | "failed" | "canceled" required -
startedAtstring required -
endedAtstring | null required -
legsSimulatedLeg[] required -
promptobject requiredThe open gather the far end is asked to answer
-
agentobject requiredThe simulated AI agent on the call, which you play
-
-
- 400
Invalid request
- 401
Missing or invalid API key
- 403
A live key (
test_mode_only): the simulator runs in test mode only - 404
Not found
- 429
rate_limited, or another limit named byerror.code
Play the monitoring supervisor: whispering, only the rep hears it; barging, everyone does
POST /v1/simulator/calls/{id}/supervisor/say simulator:write
Path
idstring required
Body
-
textstring required
Responses
- 200
OK
Fields
-
dataSimulatedCall requiredFields
-
idstring required -
direction"inbound" | "outbound" required -
fromstring required -
tostring required -
status"queued" | "ringing" | "in_progress" | "completed" | "busy" | "no_answer" | "failed" | "canceled" required -
startedAtstring required -
endedAtstring | null required -
legsSimulatedLeg[] required -
promptobject requiredThe open gather the far end is asked to answer
-
agentobject requiredThe simulated AI agent on the call, which you play
-
-
- 400
Invalid request
- 401
Missing or invalid API key
- 403
A live key (
test_mode_only): the simulator runs in test mode only - 404
Not found
- 429
rate_limited, or another limit named byerror.code
Play the rep: what they say is in a test call's transcript
POST /v1/simulator/calls/{id}/rep/say simulator:write
Path
idstring required
Body
-
textstring required
Responses
- 200
OK
Fields
-
dataSimulatedCall requiredFields
-
idstring required -
direction"inbound" | "outbound" required -
fromstring required -
tostring required -
status"queued" | "ringing" | "in_progress" | "completed" | "busy" | "no_answer" | "failed" | "canceled" required -
startedAtstring required -
endedAtstring | null required -
legsSimulatedLeg[] required -
promptobject requiredThe open gather the far end is asked to answer
-
agentobject requiredThe simulated AI agent on the call, which you play
-
-
- 400
Invalid request
- 401
Missing or invalid API key
- 403
A live key (
test_mode_only): the simulator runs in test mode only - 404
Not found
- 429
rate_limited, or another limit named byerror.code
Play the AI agent: end the conversation (runs onEnd / onAgentEnd)
POST /v1/simulator/calls/{id}/agent/end simulator:write
Path
idstring required
Body
-
outcomestringDefault
"completed". -
order"webhook_first" | "stream_first"
Responses
- 200
OK
Fields
-
dataSimulatedCall requiredFields
-
idstring required -
direction"inbound" | "outbound" required -
fromstring required -
tostring required -
status"queued" | "ringing" | "in_progress" | "completed" | "busy" | "no_answer" | "failed" | "canceled" required -
startedAtstring required -
endedAtstring | null required -
legsSimulatedLeg[] required -
promptobject requiredThe open gather the far end is asked to answer
-
agentobject requiredThe simulated AI agent on the call, which you play
-
-
- 400
Invalid request
- 401
Missing or invalid API key
- 403
A live key (
test_mode_only): the simulator runs in test mode only - 404
Not found
- 429
rate_limited, or another limit named byerror.code
Play the AI agent's platform: deliver its post-call report and summary now, whether or not it has ended
POST /v1/simulator/calls/{id}/agent/report simulator:write
Path
idstring required
Body
-
summarystring required -
startedAtstring
Responses
- 200
OK
Fields
-
dataSimulatedCall requiredFields
-
idstring required -
direction"inbound" | "outbound" required -
fromstring required -
tostring required -
status"queued" | "ringing" | "in_progress" | "completed" | "busy" | "no_answer" | "failed" | "canceled" required -
startedAtstring required -
endedAtstring | null required -
legsSimulatedLeg[] required -
promptobject requiredThe open gather the far end is asked to answer
-
agentobject requiredThe simulated AI agent on the call, which you play
-
-
- 400
Invalid request
- 401
Missing or invalid API key
- 403
A live key (
test_mode_only): the simulator runs in test mode only - 404
Not found
- 429
rate_limited, or another limit named byerror.code