The AgentPhone API uses standard HTTP status codes and returns detailed error information in a consistent JSON format.
All errors follow this structure:
VALIDATION_ERRORRequest validation failed. Check the details field for specific field errors.
VALIDATION_ERROR_NUMBER_LIMITPhone number limit reached. Self-serve accounts can provision up to 10 numbers. Contact us to increase your limit.
INSUFFICIENT_BALANCEYour balance is too low to complete this action. Add funds from the Billing page or enable auto-recharge. Provisioning a number requires at least $3.00.
RATE_LIMIT_EXCEEDEDRate limit exceeded. Check the Retry-After header for when to retry.
PHONE_NUMBER_NOT_FOUNDThe requested phone number doesn’t exist or you don’t have access to it.
CARRIER_ERRORError from carrier service. Usually a temporary issue — retry with exponential backoff.
Previously returned as TWILIO_ERROR. The deprecated code still works but will be removed in a future version.
For 429, 500, 502, 503, and 504 errors, implement exponential backoff:
If you’re using the official SDKs, retry logic is built in. The TypeScript SDK automatically retries on 408, 429, and 5xx errors with exponential backoff (default: 2 retries).