Integrations
Make an Outbound Call
Place a phone call from your backend with one API request.
Call any phone number from your backend and play a message when it's answered.
How it works
Your backend ── POST /v1/voice/accounts/{auth_id}/calls ──▶ TryVox ──▶ phone rings
│
answered: TryVox asks your answer_url what to do (VoxML)Before you start
- API credentials, approved KYC, and wallet balance. See Before any guide.
- An active TryVox number on your account. This is your
from. - A public HTTPS URL that returns VoxML. To test without a server, use
https://api.tryvox.io/voice-test, which says a short greeting and hangs up.
Try it
export TRYVOX_AUTH_ID=TJxxxxxxxx
export TRYVOX_AUTH_TOKEN=your-auth-token
curl -X POST https://api.tryvox.io/v1/voice/accounts/$TRYVOX_AUTH_ID/calls \
-u $TRYVOX_AUTH_ID:$TRYVOX_AUTH_TOKEN \
-H "Content-Type: application/json" \
-d '{
"from": "+918045671234",
"to": "+919812345678",
"answer_url": "https://api.tryvox.io/voice-test"
}'The same request from Node.js 18 or newer, with no libraries:
const { TRYVOX_AUTH_ID, TRYVOX_AUTH_TOKEN } = process.env;
const res = await fetch(`https://api.tryvox.io/v1/voice/accounts/${TRYVOX_AUTH_ID}/calls`, {
method: 'POST',
headers: {
Authorization: 'Basic ' + Buffer.from(`${TRYVOX_AUTH_ID}:${TRYVOX_AUTH_TOKEN}`).toString('base64'),
'Content-Type': 'application/json',
},
body: JSON.stringify({
from: '+918045671234', // your TryVox number
to: '+919812345678', // who to call
answer_url: 'https://api.tryvox.io/voice-test',
}),
});
console.log(res.status, await res.json());node call.jsExpected result
201 Created straight away. The phone rings a moment later.
{
"data": {
"request_uuid": "550e8400-e29b-41d4-a716-446655440000",
"account_id": "TJab12cd34",
"auth_id": "TJab12cd34",
"from": "+918045671234",
"to": "+919812345678",
"direction": "outbound",
"status": "queued",
"start_time": "2026-10-30T10:35:00Z",
"duration": 0,
"billsec": 0
}
}queued means accepted, not connected. Keep request_uuid: it identifies this call everywhere else.
What happens next
- The phone rings.
ring_urlandstatus_callback_urlare called now, if you set them. - When the call is answered, TryVox
POSTs to youranswer_urland runs the VoxML you return. - When the call ends,
hangup_urlreceives the result (completed,busy,no-answer,cancelled,failed) and the duration.
To follow the call, add status_callback_url, hangup_url and webhook_secret, as in Receive Call Events. Or poll Get Call for up to 24 hours.
Next step
- Return your own VoxML: Say, Gather for keypad input, Dial to connect a person, Stream for your own speech AI.
- Every request field: Make a Call.
Troubleshooting
| Problem | Fix |
|---|---|
403 KYC_REQUIRED | Finish KYC in the dashboard first. |
402 INSUFFICIENT_BALANCE | Top up the wallet. |
429 RATE_LIMITED | You're at your concurrent-call limit. Wait for a call to end. |
201, but nothing rings | from must be a number your account owns and is active. Use E.164 for both numbers (+91…). Check the call with Get Call: status: failed with a DISPATCH_FAILED cause means the from was refused. |
| Call connects to "An application error has occurred" | Your answer_url didn't return valid VoxML within 15 seconds. |