Getting Started
Quickstart
Go from a new account to your first outbound and inbound call.
This guide takes a new account from API credentials to a working outbound call and a working inbound call. Run the steps in order — each one depends on the one before it.
Prerequisites
- A TryVox account (sign up at tryvox.io)
- curl or any HTTP client
- A publicly reachable HTTPS URL that can return a VoxML response (a tunnel such as ngrok works for testing)
Step 1: Get Your API Credentials
- Log in to the TryVox Dashboard
- Go to Account → API keys
- Create an API key
- Copy both values:
- Auth ID —
TJfollowed by 8 hex characters (e.g.,TJab12cd34) - Auth Token — 32 hex characters
- Auth ID —
The Auth Token is shown once. Store it somewhere safe — if you lose it, create a new key.
Every request in this guide authenticates with HTTP Basic auth: Auth ID as the username, Auth Token as the password. With curl that's the -u flag.
export TRYVOX_AUTH_ID="TJab12cd34"
export TRYVOX_AUTH_TOKEN="<your-auth-token>"Step 2: Complete KYC and Fund Your Wallet
Two account prerequisites must be in place before you can buy a number or place a call:
-
KYC approval. Complete verification in the dashboard under Compliance (KYC). Until your KYC is approved, purchasing numbers, every
/v1/applicationsrequest, and every/v1/voicerequest are rejected with403:{ "error": { "code": "KYC_REQUIRED", "message": "KYC verification is required before purchasing a phone number.", "kyc_status": "<your current KYC status>", "required_next_action": "complete_kyc", "redirect_to": "/app/compliance/kyc" } }The message mentions phone numbers on every KYC-gated route, including voice. Browsing the number catalog (Step 3) works before KYC is approved.
-
Wallet balance. Buying a number debits the setup fee and first month's rental from your wallet, and pay-as-you-go calls need an available balance of at least ₹10. Add funds under Billing → Wallet. A purchase without enough balance fails with
402 INSUFFICIENT_BALANCE.
Step 3: Find an Available Number
Search the number catalog. All filters are optional.
curl "https://api.tryvox.io/v1/account/$TRYVOX_AUTH_ID/inventory/numbers?country=IN&per_page=5" \
-u $TRYVOX_AUTH_ID:$TRYVOX_AUTH_TOKENResponse (one item shown, fields abridged):
{
"data": [
{
"id": "6f1c2b9e-3a4d-4c1e-9b7a-2d5e8f0a1b2c",
"e164": "+918045671234",
"country": "IN",
"region": "Bengaluru",
"circle": "Karnataka",
"city": "Bengaluru",
"type": "fixed_line",
"status": "active",
"currency": "INR"
}
],
"meta": {
"page": 1,
"per_page": 5,
"has_more": true
}
}Pick an e164 from the results. See Search Available Numbers for every filter.
Step 4: Purchase the Number
curl -X POST https://api.tryvox.io/v1/account/$TRYVOX_AUTH_ID/numbers/purchase-from-inventory \
-u $TRYVOX_AUTH_ID:$TRYVOX_AUTH_TOKEN \
-H "Content-Type: application/json" \
-d '{
"e164": "+918045671234"
}'e164 is the only required field. Omit plan_code to buy the number on pay-as-you-go.
Response — 201 Created (fields abridged):
{
"data": {
"id": "6f1c2b9e-3a4d-4c1e-9b7a-2d5e8f0a1b2c",
"account_id": "TJab12cd34",
"e164": "+918045671234",
"country": "IN",
"type": "fixed_line",
"status": "active",
"plan_code": "PAY_AS_YOU_GO",
"currency": "INR",
"purchased_at": "2026-10-30T10:30:00Z"
}
}The number is now owned by your account. Only numbers your account owns can be used as the from number of an outbound call.
Step 5: Serve VoxML From Your Answer URL
When a call is answered, TryVox sends a POST with a JSON body to your answer URL:
{
"call_uuid": "550e8400-e29b-41d4-a716-446655440000",
"account_id": "TJab12cd34",
"from": "+918045671234",
"to": "+919812345678",
"direction": "outbound",
"status": "answered"
}Respond within 15 seconds with VoxML (Content-Type: application/json):
{
"voxml_version": "1.0",
"instructions": [
{
"verb": "Say",
"text": "Hello! You are connected to TryVox.",
"language": "en-IN"
},
{
"verb": "Stream",
"url": "wss://your-app.com/ai-agent",
"track": "inbound_track"
}
]
}- Say — speaks the text with text-to-speech
- Stream — opens a WebSocket to your server and streams the caller's audio to it, so your AI or speech service can respond in real time
See the VoxML reference for every verb.
Step 6: Make an Outbound Call
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://your-app.com/answer"
}'from— the number you bought in Step 4to— the destination, in E.164 formatanswer_url— the URL from Step 5
Response — 201 Created:
{
"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 the call was accepted, not that it connected. Follow its progress with Get Call or a status_callback_url.
Step 7: Receive an Inbound Call
To answer calls to your number, create a voice application that points at your answer URL, then assign the number to it.
Create the application:
curl -X POST https://api.tryvox.io/v1/voice/applications \
-u $TRYVOX_AUTH_ID:$TRYVOX_AUTH_TOKEN \
-H "Content-Type: application/json" \
-d '{
"name": "Quickstart app",
"answer_url": "https://your-app.com/answer"
}'Copy the id from the response (data.id).
Assign your number to it:
curl -X POST "https://api.tryvox.io/v1/account/$TRYVOX_AUTH_ID/numbers/+918045671234/application" \
-u $TRYVOX_AUTH_ID:$TRYVOX_AUTH_TOKEN \
-H "Content-Type: application/json" \
-d '{
"application_id": "<application-id>"
}'Call your number from any phone. TryVox fetches VoxML from your answer URL with direction set to inbound, then runs it.
Next Steps
Voice API Reference
Place, inspect, and control calls
VoxML Guide
Every VoxML verb with examples
Webhooks
Handle call lifecycle events
AI Agents
Connect Vapi, ElevenLabs, Retell, LiveKit, or Bolna
Need Help?
- Follow a working example for your use case in Integrations
- Email us at team@tryvox.io
Introduction
Build voice AI on Indian phone numbers: buy +91 numbers, connect SIP trunks, control calls with VoxML, stream audio, and put Vapi, ElevenLabs, Retell, LiveKit, or Bolna agents on the phone.
Authentication
Authenticate your API requests with HTTP Basic auth using your Auth ID and Auth Token.