Getting Started
Error Handling
Understand TryVox API error responses and codes.
TryVox uses conventional HTTP status codes and structured error responses to indicate the success or failure of API requests. For step-by-step fixes, see Troubleshooting.
Error Response Format
Error responses share one JSON structure:
{
"error": {
"code": "VALIDATION_FAILED",
"message": "answer_url is required",
"request_id": "c7d0e1f2-..."
}
}Error Object Fields
- code — Machine-readable error code. Branch on this, not on
message. - message — Human-readable description. Wording can change.
- request_id — Present on most errors. Include it when you contact support.
- details — Optional array of
{ "field", "reason" }objects for field-level validation failures.
Some errors carry extra fields alongside code and message — for example KYC_REQUIRED includes kyc_status, required_next_action, and redirect_to, and 409 "in use" errors list the affected numbers.
Common Error Codes
These codes are returned across the API. Individual endpoint pages list the codes specific to them.
Authentication and access
| Code | HTTP Status | Meaning |
|---|---|---|
UNAUTHORIZED | 401 | No credentials were sent |
INVALID_CREDENTIALS | 401 | Auth ID / Auth Token wrong, or the Basic auth header is malformed |
INVALID_TOKEN | 401 | Dashboard session token is invalid or expired |
FORBIDDEN | 403 | The credentials can't access this resource — e.g. the {auth_id} in the URL isn't your account |
ACCOUNT_SUSPENDED | 403 | The account (or your team membership) is not active |
ACCOUNT_MANAGER_REQUIRED | 403 | Only the account owner or a team admin can use this feature |
KYC_REQUIRED | 403 | KYC must be approved first. Applies to number purchases and configuration, SIP trunk setup, and every /v1/voice and /v1/applications request. |
Request and resource
| Code | HTTP Status | Meaning |
|---|---|---|
VALIDATION_FAILED | 400 | The request is missing a field, has an invalid value, or the resource is in the wrong state for the action (e.g. a call action on a call that isn't answered) |
NOT_FOUND | 404 | The resource doesn't exist on your account |
ALREADY_EXISTS | 409 | The resource already exists (e.g. a number already owned by an account) |
INSUFFICIENT_BALANCE | 402 | Your wallet balance doesn't cover the charge |
Capacity
| Code | HTTP Status | Meaning |
|---|---|---|
RATE_LIMITED | 429 | Your account's concurrent-call limit is reached, or a call couldn't be admitted within the calls-per-second window. This is call capacity, not an HTTP request limit. |
Server
| Code | HTTP Status | Meaning |
|---|---|---|
INTERNAL_ERROR | 500 | Unexpected error |
BAD_GATEWAY | 502 | The gateway couldn't reach the service handling the request |
SERVICE_UNAVAILABLE | 502 or 503 | A dependency is unavailable (e.g. no media server for a call) |
Request Rate Limits
TryVox does not currently apply per-key HTTP request rate limits and does not send a Retry-After header. The 429 you can receive comes from call capacity — your account's concurrent-call and calls-per-second limits — not from request volume. See Capacity for how those limits work.
Write clients that back off on 429 anyway: request limits may be introduced, and call capacity frees up as calls end.
Retrying
- Retry with backoff:
429,500,502,503. - Don't retry unchanged:
400,401,402,403,404,409— fix the request, credentials, balance, or KYC status first. - A
201from Make a Call means the call was queued, not connected. Retrying it places a second call.
Best Practices
- Check the HTTP status and
codebefore parsing the rest of the body - Log
request_idwith every failure - Back off and retry transient errors (429, 500, 502, 503)
- Validate inputs client-side — for example E.164 formatting, which the API does not always check
Next Steps
- Set up webhooks to handle asynchronous events
- Explore the Voice API to make calls
- Learn VoxML to control call flow