Error Response Format
All API errors use a standardized JSON format:Standard Error Response
Response Fields
HTTP Status Codes
2xx Success
4xx Client Errors
5xx Server Errors
Common Errors
Authentication Errors
INVALID_CREDENTIALS - 401
INVALID_CREDENTIALS - 401
Email/password combination incorrect.
TOKEN_EXPIRED - 401
TOKEN_EXPIRED - 401
Access token has expired (use refresh token).
ACCOUNT_INACTIVE - 403
ACCOUNT_INACTIVE - 403
Account has been deactivated.
Resource Errors
TRUNK_NOT_FOUND - 404
TRUNK_NOT_FOUND - 404
Trunk ID does not exist or belongs to a different account.
DUPLICATE_USERNAME - 409
DUPLICATE_USERNAME - 409
Trunk username already exists.
Balance & Billing Errors
INSUFFICIENT_BALANCE - 402
INSUFFICIENT_BALANCE - 402
Account balance too low.
PAYMENT_FAILED - 402
PAYMENT_FAILED - 402
Payment processing failed.
Rate Limiting
RATE_LIMIT_EXCEEDED - 429
RATE_LIMIT_EXCEEDED - 429
Too many requests or calls.
Validation Errors
When request validation fails (422 status), the response includes detailed field-level errors:Validation Error Response
Handling validation errors: Parse the
details.errors array to display field-specific error messages in your UI. Each error includes the field name, error code, and the invalid value.Troubleshooting Guide
- Check HTTP status code first - The status code category tells you who’s at fault: 4xx = client error (fix your request), 5xx = server error (retry or contact support).
- Always log
requestId- Save therequestIdfrom error responses. When contacting support, include this ID for faster debugging and resolution. - Implement exponential backoff - For 429 (rate limit) and 503 (service unavailable) errors, retry with exponential backoff: wait 1s, then 2s, then 4s, etc. Check the
Retry-Afterheader if present. - Validate before sending - Implement client-side validation matching API requirements to catch errors before making requests. Reduces unnecessary API calls and improves user experience.
- Monitor error rates - Track error response counts and types over time. Sudden spikes in specific error codes may indicate configuration issues or API changes requiring attention.
If you’re seeing unexpected errors across multiple requests, check the Vobiz Status Page for any active incidents before opening a support ticket.
Common 401 Fixes
- Ensure
X-Auth-IDandX-Auth-Tokenheaders are included - Check token hasn’t expired
- Verify account is active (
is_active=true)