Voice API
Call Actions
Perform actions on an active call — transfer, record, play audio, speak text, send DTMF.
Operate on calls that are already in progress. Every action endpoint is fire-and-forget: TryVox returns 204 No Content on success and the side effect happens asynchronously on the media server. There is no synchronous "operation completed" response — use hangup_url, status_callback_url, and the Recordings API to observe results.
{call_uuid} in every URL is the request_uuid returned when the call was created (or the call_uuid in the inbound answer_url payload).
Transfer Call
Bridge an active call to somewhere else — a phone number, or several phone numbers at once.
aleg_url is a destination, not a URL, despite the name. It takes an E.164
number such as +919876543210 or a SIP dial string. Passing an https:// address is rejected with
is not a valid number or dial string — transferring to a VoxML script is not
something this endpoint does. The parameter name is inherited and kept for
compatibility; prefer destinations in new integrations.
Endpoint
https://api.tryvox.io/v1/voice/accounts/{auth_id}/calls/{call_uuid}/transferRequest body
| Parameter | Type | Required | Description |
|---|---|---|---|
destinations | string[] | conditional | Where to send the call. Required unless aleg_url is given; wins when both are. Max 20, no duplicates. |
aleg_url | string | conditional | A single destination. The older form of destinations — equivalent to a one-element list. |
strategy | string | no | sequential (default) tries each destination in turn. simultaneous rings them all at once. |
timeout_secs | integer | no | How long destinations ring. Defaults to 45 for simultaneous, and to the carrier's own timer for a single destination. |
legs | string | no | Accepted for forward compatibility and currently ignored — only a blind transfer of the A leg is implemented. |
bleg_url | string | no | Accepted and currently ignored, as above. |
Transfer to one number
curl -X POST https://api.tryvox.io/v1/voice/accounts/$TRYVOX_AUTH_ID/calls/650e8400-e29b-41d4-a716-446655440000/transfer \
-u $TRYVOX_AUTH_ID:$TRYVOX_AUTH_TOKEN \
-H "Content-Type: application/json" \
-d '{
"destinations": ["+919876543210"]
}'Ring several numbers, first to answer wins
Set strategy to simultaneous. Every destination rings at the same time; the
first person to pick up is bridged to the caller and the other legs are
cancelled automatically. You do not need to cancel them yourself, and there is
no callback telling you which one answered.
curl -X POST https://api.tryvox.io/v1/voice/accounts/$TRYVOX_AUTH_ID/calls/$CALL_UUID/transfer \
-u $TRYVOX_AUTH_ID:$TRYVOX_AUTH_TOKEN \
-H "Content-Type: application/json" \
-d '{
"destinations": [
"+919876543210",
"+919876543211",
"+919876543212"
],
"strategy": "simultaneous",
"timeout_secs": 45
}'With sequential the same list is a hunt group instead: the second number is
only tried once the first fails or times out, so it occupies one channel at a
time rather than three.
How many channels a fan-out uses
This is the part that surprises people. A simultaneous transfer uses one channel per destination, for the whole time they ring — plus the channel the original call is already using.
| Channels | |
|---|---|
| The original call | 1 |
| Ringing 5 numbers simultaneously | 5 |
| Total while ringing | 6 |
So ringing 10 numbers needs 11 channels, not 10. A request wider than your remaining concurrency is refused before anything is dialled, with an error that names the numbers:
ringing 10 numbers at once needs 10 free channels; this account has 1 of 10
in use, so 9 are free. Reduce the destination list or add concurrency.Once someone answers, the other legs drop and you are back to 2 channels — the caller and the person who answered. Only the ring window is expensive.
Originating several legs at once counts against your calls per second limit as well as concurrency, and the two are bought separately — an account with plenty of channels can still have a CPS limit below its fan-out width. A request that would breach it is refused the same way:
ringing 10 numbers at once starts 10 calls in one second, above this
account's limit of 3 per second (0 already used). Reduce the destination
list, use the sequential strategy, or add CPS.sequential starts one call at a time, so it is unaffected by CPS and is the
right choice for a team where you do not expect everyone to answer.
Response
204 No Content on accept — the bridge happens asynchronously on the media
server. A rejected request (bad number, duplicate destination, list too long,
not enough concurrency) returns 400 with the reason, before any leg is dialled.
If the transfer is accepted but every destination then fails to answer, what the caller hears depends on whether a failover prompt is configured for the platform. With one set, they hear it and the call ends. Without one the call ends immediately and they hear nothing — so with a wide simultaneous transfer, where "nobody picked up" is routine, ask support to configure one.
fallback_url is not consulted on a failed transfer either way — it applies
only when fetching VoxML from answer_url fails.
Start Recording
Begin recording an in-progress call. The recording runs asynchronously and ends when you call Stop, the call hangs up, or time_limit elapses. The finished recording is then stored and available from the Recordings API.
Endpoint
https://api.tryvox.io/v1/voice/accounts/{auth_id}/calls/{call_uuid}/recordRequest body
| Parameter | Type | Required | Description |
|---|---|---|---|
time_limit | integer | no | Maximum recording duration in seconds. The recording auto-stops when it elapses. |
file_format | string | no | mp3 or wav. Default: mp3. |
callback_url | string | no | Accepted but not called today — no recording webhook is sent. Use the Recordings API instead. |
transcription_type, transcription_url, callback_method | string | no | Accepted for compatibility and ignored. |
Example request
curl -X POST https://api.tryvox.io/v1/voice/accounts/$TRYVOX_AUTH_ID/calls/650e8400-e29b-41d4-a716-446655440000/record \
-u $TRYVOX_AUTH_ID:$TRYVOX_AUTH_TOKEN \
-H "Content-Type: application/json" \
-d '{
"time_limit": 3600,
"file_format": "mp3"
}'Response
204 No Content. There's no synchronous recording URL. Once the recording finishes, find it with List Recordings filtered by call_uuid.
Stop Recording
End an in-progress recording before time_limit is reached.
Endpoint
https://api.tryvox.io/v1/voice/accounts/{auth_id}/calls/{call_uuid}/recordExample request
curl -X DELETE https://api.tryvox.io/v1/voice/accounts/$TRYVOX_AUTH_ID/calls/650e8400-e29b-41d4-a716-446655440000/record \
-u $TRYVOX_AUTH_ID:$TRYVOX_AUTH_TOKENResponse
204 No Content. The recording finalises asynchronously and then appears in the Recordings API.
Play Audio
Stream one or more audio files into an active call. Multiple URLs are queued in order. Use loop for hold music, mix to overlay (e.g. background ambience while TTS plays).
Endpoint
https://api.tryvox.io/v1/voice/accounts/{auth_id}/calls/{call_uuid}/playRequest body
| Parameter | Type | Required | Description |
|---|---|---|---|
urls | string[] | yes | Array of public URLs to mp3/wav files. Played in order. |
length | integer | no | Accepted and ignored — playback is not truncated. |
legs | string | no | aleg, bleg, or both. Default: aleg. |
loop | boolean | no | Loop the playlist indefinitely. Default: false. |
mix | boolean | no | Mix with existing audio instead of interrupting. Default: false. |
Example request
curl -X POST https://api.tryvox.io/v1/voice/accounts/$TRYVOX_AUTH_ID/calls/650e8400-e29b-41d4-a716-446655440000/play \
-u $TRYVOX_AUTH_ID:$TRYVOX_AUTH_TOKEN \
-H "Content-Type: application/json" \
-d '{
"urls": ["https://example.com/hold-music.mp3"],
"loop": true
}'Response
204 No Content.
Speak Text
Convert text to speech and play it on the call.
Endpoint
https://api.tryvox.io/v1/voice/accounts/{auth_id}/calls/{call_uuid}/speakRequest body
| Parameter | Type | Required | Description |
|---|---|---|---|
text | string | yes | Text to synthesise. Max 3000 characters. |
voice | string | no | Voice ID. Default: provider default for language. |
language | string | no | BCP-47 language tag (e.g. en-US, en-IN, hi-IN). Default: en-US. |
legs | string | no | aleg, bleg, or both. Default: aleg. |
loop | boolean | no | Repeat the synthesised audio. Default: false. |
mix | boolean | no | Mix with existing audio. Default: false. |
Example request
curl -X POST https://api.tryvox.io/v1/voice/accounts/$TRYVOX_AUTH_ID/calls/650e8400-e29b-41d4-a716-446655440000/speak \
-u $TRYVOX_AUTH_ID:$TRYVOX_AUTH_TOKEN \
-H "Content-Type: application/json" \
-d '{
"text": "Thank you for calling. Please hold while we connect you.",
"voice": "en-US-Neural-Jenny",
"language": "en-US"
}'Response
204 No Content.
Send DTMF
Send DTMF (touch-tone) digits onto a leg of the call. Useful for navigating an IVR after a transfer.
Endpoint
https://api.tryvox.io/v1/voice/accounts/{auth_id}/calls/{call_uuid}/dtmfRequest body
| Parameter | Type | Required | Description |
|---|---|---|---|
digits | string | yes | Sequence of DTMF digits: 0–9, *, #, A–D. |
leg | string | no | aleg or bleg. Default: aleg. |
duration | integer | no | Tone duration per digit, in milliseconds. |
Example request
curl -X POST https://api.tryvox.io/v1/voice/accounts/$TRYVOX_AUTH_ID/calls/650e8400-e29b-41d4-a716-446655440000/dtmf \
-u $TRYVOX_AUTH_ID:$TRYVOX_AUTH_TOKEN \
-H "Content-Type: application/json" \
-d '{"digits": "1234*#"}'Response
204 No Content.
Notes
- All actions require the call to be in
answeredstate. Calling them on aqueued,ringing,hangup, orfailedcall returns400 VALIDATION_FAILED("call is not in an active state"). An unknowncall_uuidreturns404 NOT_FOUND. - Actions execute asynchronously; the
204response means "accepted", not "applied". - Newly-started Play or Speak interrupts any in-flight Play or Speak unless
mix: trueis set. - Audio URLs must be publicly reachable.
- Recordings of both legs are mixed into a single file. There is no per-leg mode currently.
- A failed transfer drops the caller.
fallback_urlis not consulted — see Transfer Call above. legsandbleg_urlare accepted on Transfer Call but currently ignored; only a blind transfer of the A leg is implemented.