Error Response Format
All error responses follow a consistent JSON format:
{
"success": false,
"error": {
"code": "invalid_parameter",
"message": "The 'to' field must be a valid phone number",
"param": "to"
}
}HTTP Status Codes
400Bad Request
The request was malformed or missing required parameters.
401Unauthorized
Authentication failed. Check your API key.
403Forbidden
You don't have permission to access this resource.
404Not Found
The requested resource doesn't exist.
429Too Many Requests
Rate limit exceeded. Slow down your requests.
500Internal Server Error
Something went wrong on our end. Try again later.
Best Practices
- Always check the
successfield in responses - Implement exponential backoff for rate limit errors (429)
- Log error codes and messages for debugging
- Retry failed requests with idempotency keys