Reference
Errors
Errors return an HTTP code and a JSON body with status set to "error" and a readable message.
| Code | Cause | What to do |
|---|---|---|
400 |
The body is not valid JSON. | Check the syntax and the Content-Type header. |
401 |
Missing or invalid API key, or test key used outside the message endpoints. | Check the x-api-key header. |
402 |
Not enough credit for this message (code: insufficient_credit). Nothing is sent. |
Top up your credits, see Credits and billing. |
403 |
Real sending not allowed: trial period (only to your verified numbers, 20 SMS), or restricted organization. | Get your business verified, or use the test key. |
409 |
This request_id is already used for this recipient: an identical send is still in progress, or the text differs. |
Wait a moment and retry, or use one request_id per message. |
422 |
A field is invalid. Per-field details are in data. |
Fix the field shown. |
429 |
Too many requests for this key (code: rate_limited), see Limits. |
Wait the number of seconds given by Retry-After. |
500 |
Error on our side. | Retry with the same request_id. |
{ "status": "error", "message": "validation errors while sending message", "data": { "to": ["The to field must contain only digits and must be less than 14 characters"] }}