Integrations
Serve Many Customers from One Account
Give each of your customers a sub-account with its own KYC, numbers and API key, all paid from your wallet.
Your platform uses one TryVox main account. For each of your customers, you create a sub-account. Each sub-account has its own KYC, numbers and API key, and every charge comes from your main wallet.
Your customers never need to deal with TryVox. Your backend creates their sub-account, submits their KYC, creates their API key, and uses that key for their numbers and calls.
| Main account (you) | Sub-account (your customer) | |
|---|---|---|
| Wallet | Holds the balance and pays for everything | None; spends from yours |
| KYC | Your own | Its own by default, reviewed by TryVox |
| API key | Created in the dashboard or by API | Created by you, from your main account |
| Numbers and calls | Your own | The customer's own; other accounts can't use them |
| TryVox dashboard login | Yes | Optional; off unless you turn it on |
Before you start
- A TryVox main account with approved KYC and wallet balance. See Before any guide.
- Your main account's Auth ID and Auth Token, from Account → API keys.
export TRYVOX_AUTH_ID="<main-account-auth-id>"
export TRYVOX_AUTH_TOKEN="<main-account-auth-token>"All requests use https://api.tryvox.io and HTTP Basic authentication. Send them from your backend only.
1. Create the sub-account
curl -X POST "https://api.tryvox.io/v1/tenants/$TRYVOX_AUTH_ID/sub-accounts" \
-u "$TRYVOX_AUTH_ID:$TRYVOX_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Acme Support",
"email": "support@acme.example",
"account_type": "business",
"external_reference": "customer-1042"
}'| Field | Required | Notes |
|---|---|---|
name | Yes | Customer's display name |
email | Yes | Must be unique across TryVox |
account_type | No | individual (default) or business; decides the KYC documents |
external_reference | No | Your own customer ID, up to 200 characters; defaults to the email |
kyc_mode | No | customer_use (default): its own KYC. personal_use: uses your KYC, and stops working if yours is no longer approved |
password, send_login_invite | No | Only if the customer should sign in to the TryVox dashboard. Leave both out and TryVox never contacts your customer |
The response is 201 Created. Save data.id against the customer in your database. It's the {subaccount_id} in every request below.
export SUBACCOUNT_ID="<data.id>"A retry with the same external_reference and details returns the same sub-account, so retrying after a timeout is safe. The same reference with different details returns 409 ALREADY_EXISTS. See Create a sub-account for every field.
2. Submit the customer's KYC
Skip this step for a personal_use sub-account.
Get the fields and documents this customer needs:
curl "https://api.tryvox.io/v1/tenants/$TRYVOX_AUTH_ID/sub-accounts/$SUBACCOUNT_ID/kyc/requirements" \
-u "$TRYVOX_AUTH_ID:$TRYVOX_AUTH_TOKEN"{
"data": {
"account_type": "business",
"required_fields": ["business_name", "registered_address", "representative_name", "representative_role"],
"required_documents": ["pan", "aadhaar_front", "aadhaar_back", "business_proof", "address_proof"],
"mime_types": ["image/jpeg", "image/png", "application/pdf"],
"max_document_bytes": 10485760
}
}Read the requirements each time instead of hardcoding them. Then send the details and every document in one multipart request. Each file's form field is document_ followed by the document type:
curl -X POST "https://api.tryvox.io/v1/tenants/$TRYVOX_AUTH_ID/sub-accounts/$SUBACCOUNT_ID/kyc/submit" \
-u "$TRYVOX_AUTH_ID:$TRYVOX_AUTH_TOKEN" \
-F 'details={"business_name":"Acme Ltd","registered_address":"1 Example Road","representative_name":"A Person","representative_role":"Director"}' \
-F "document_pan=@pan.pdf" \
-F "document_aadhaar_front=@aadhaar-front.pdf" \
-F "document_aadhaar_back=@aadhaar-back.pdf" \
-F "document_business_proof=@business-proof.pdf" \
-F "document_address_proof=@address-proof.pdf"The response is 201 Created with manual_kyc_status: "pending_review".
3. Wait for approval
TryVox reviews every submission. Check the result:
curl "https://api.tryvox.io/v1/tenants/$TRYVOX_AUTH_ID/sub-accounts/$SUBACCOUNT_ID/kyc/status" \
-u "$TRYVOX_AUTH_ID:$TRYVOX_AUTH_TOKEN"manual_kyc_status | What to do |
|---|---|
not_submitted | Submit KYC (step 2) |
pending_review | Wait for TryVox's decision |
approved | The customer can buy numbers and make calls |
rejected | Read the rejection reason, correct it and submit again |
re_kyc | Submit updated documents |
Until it's approved, buying a number or creating an application returns 403 KYC_REQUIRED. See Verification.
4. Create the customer's API key
Your main account creates the key. You can do this before KYC is approved.
curl -X POST "https://api.tryvox.io/v1/tenants/$TRYVOX_AUTH_ID/sub-accounts/$SUBACCOUNT_ID/api-keys" \
-u "$TRYVOX_AUTH_ID:$TRYVOX_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "acme-production"}'{
"data": {
"id": "6f1c2b9e-3a4d-4c1e-9b7a-2d5e8f0a1b2c",
"name": "acme-production",
"auth_id": "TJ59ce44df",
"key": "<auth-token>",
"permissions": [],
"created_at": "2026-11-12T10:30:00Z"
}
}auth_id and key are the customer's Auth ID and Auth Token. The token is shown only once, so store it encrypted next to the customer's record.
export AUTH_ID="<data.auth_id>"
export AUTH_TOKEN="<data.key>"This key reaches only that customer's numbers, calls and records. It can't see your wallet, your API keys or your other customers. See Sub-account API keys.
5. Buy a number for the customer
From here on, use the customer's key. The number belongs to the customer, and the cost comes from your wallet.
Search the catalog. This doesn't need KYC:
curl "https://api.tryvox.io/v1/account/$AUTH_ID/inventory/numbers?country=IN&city=Bengaluru&per_page=10" \
-u "$AUTH_ID:$AUTH_TOKEN"Use e164 as the number, and setup_fee and monthly_fee for pricing. Other filters are in Search Available Numbers.
Optionally get a quote. It doesn't reserve the number:
curl -X POST "https://api.tryvox.io/v1/account/$AUTH_ID/numbers/purchase-quote" \
-u "$AUTH_ID:$AUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{"e164s": ["+918045671234"], "plan_code": "PAY_AS_YOU_GO"}'Buy it:
curl -X POST "https://api.tryvox.io/v1/account/$AUTH_ID/numbers/purchase-from-inventory" \
-u "$AUTH_ID:$AUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{"e164": "+918045671234"}'- Sub-accounts buy on the pay-as-you-go plan only. Leave out
plan_code, or sendPAY_AS_YOU_GO. Any other plan returns400 VALIDATION_FAILED. - The setup fee and first month's rental come from your wallet. Rental renews every 30 days, and calls are billed per minute.
- If the response is lost, retry the same number. You aren't charged twice.
- If your wallet is short, the purchase returns
402 INSUFFICIENT_BALANCEand the number stays reserved for this customer aspending_purchase. Recharge, then retry the same number to complete it.
6. Receive calls
Create an application, then attach it to the number:
curl -X POST "https://api.tryvox.io/v1/voice/applications" \
-u "$AUTH_ID:$AUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "Acme inbound", "answer_url": "https://your-app.example/answer", "hangup_url": "https://your-app.example/hangup", "webhook_secret": "<your-secret>"}'
curl -X POST "https://api.tryvox.io/v1/account/$AUTH_ID/numbers/+918045671234/application" \
-u "$AUTH_ID:$AUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{"application_id": "<application-id>"}'Attach only applications created with the same customer's key; any other application returns 404. When a call arrives, TryVox requests your answer_url, which returns VoxML JSON to say what the call does. To send it to an AI agent, see Connect Voice AI. Full example: Receive Calls.
7. Make calls
from must be an active number owned by this customer. A call to a phone number without from returns 400.
curl -X POST "https://api.tryvox.io/v1/voice/accounts/$AUTH_ID/calls" \
-u "$AUTH_ID:$AUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"from": "+918045671234",
"to": "+919812345678",
"answer_url": "https://your-app.example/answer",
"status_callback_url": "https://your-app.example/status",
"hangup_url": "https://your-app.example/hangup",
"webhook_secret": "<your-secret>"
}'Save the returned request_uuid. Every event for the call carries it as CallUUID. The Hangup event on hangup_url is the final result, with Status, Duration and Billsec.
TryVox signs these requests only when you send a webhook_secret, so always send one, and verify the signature as shown in Receive Call Events. Full example: Make a Call.
8. Call records and recordings
| Action | Request |
|---|---|
| List call records | GET /v1/account/{auth_id}/cdr |
| Get one call record | GET /v1/account/{auth_id}/cdr/{uuid} |
| List recordings | GET /v1/account/{auth_id}/recordings |
Use the customer's key. See Call Records and Recordings.
9. Bill your customers
With your main-account key, get one customer's charges for a date range:
curl "https://api.tryvox.io/v1/account/$TRYVOX_AUTH_ID/billing/sub-account-usage/$SUBACCOUNT_ID?currency=INR&from=2026-11-01&to=2026-11-30" \
-u "$TRYVOX_AUTH_ID:$TRYVOX_AUTH_TOKEN"The response lists each charge and the net_charges total. See usage and charges.
Keep your wallet funded
Your wallet pays for every sub-account, with no limit per customer. When it runs low, every customer's purchases and calls stop.
Manage customers
All with your main-account key:
| Action | Request |
|---|---|
| List | GET /v1/tenants/{tenant_id}/sub-accounts |
| Get one | GET /v1/tenants/{tenant_id}/sub-accounts/{subaccount_id} |
| Update name, email, phone, description | PUT /v1/tenants/{tenant_id}/sub-accounts/{subaccount_id} |
| Suspend: stops its keys, login, and calls in and out | POST /v1/tenants/{tenant_id}/sub-accounts/{subaccount_id}/suspend |
| Reactivate | POST /v1/tenants/{tenant_id}/sub-accounts/{subaccount_id}/reactivate |
| Close | DELETE /v1/tenants/{tenant_id}/sub-accounts/{subaccount_id} |
Closing doesn't release numbers or stop their rental. Release each number with the customer's key first. See Manage sub-accounts.
Errors
| Status | Code | What it means |
|---|---|---|
400 | VALIDATION_FAILED | A field is missing or invalid |
401 | INVALID_CREDENTIALS | Wrong Auth ID or Auth Token, or the sub-account is suspended or closed |
402 | INSUFFICIENT_BALANCE | Your wallet needs a recharge |
403 | KYC_REQUIRED | The customer's KYC isn't approved yet |
403 | FORBIDDEN | The key doesn't belong to the account in the URL |
403 | ACCOUNT_MANAGER_REQUIRED | Use your main-account key, not a customer key |
409 | ALREADY_EXISTS | The email or external_reference is used with different details |
429 | RATE_LIMITED | Too many requests, or too many calls at once. Calls of all your customers count toward your account's limits; retry shortly |
See API errors for the response format.
Before go-live
- Create two test sub-accounts, and confirm one customer's key can't see the other's numbers or calls.
- Take one sub-account through KYC approval, then buy a number with its key.
- Test one incoming and one outgoing call on that number.
- Check the charges appear in the usage report.
- Make sure your platform shows the errors above clearly to your customers.