Reference
Error codes
Every error code the API returns, with HTTP status and meaning.
Error format#
{
"success": false,
"error": {
"code": "INSUFFICIENT_BALANCE",
"message": "Insufficient balance. Add balance to your wallet and try again.",
"details": { "required": "35.00" }
},
"meta": { "requestId": "req_1c9x0b2m4n6v8q7w" }
}error.code is stable and safe to branch on. error.message is for people and may change. Validation errors include error.details.fields.
All codes#
| Code | HTTP | Meaning |
|---|---|---|
INVALID_REQUEST | 400 | The request is malformed (invalid JSON, body too large, bad header). |
VALIDATION_ERROR | 422 | One or more fields are invalid. See error.details.fields. |
UNAUTHORIZED | 401 | Not signed in (dashboard endpoints). |
INVALID_API_KEY | 401 | The API key is missing, malformed, revoked or expired. |
FORBIDDEN | 403 | Authenticated but not allowed (IP not allowlisted, account suspended, missing permission). |
INSUFFICIENT_SCOPE | 403 | The API key does not have the scope this endpoint requires. |
ACCOUNT_SUSPENDED | 403 | The organization is suspended. Contact support. |
EMAIL_NOT_VERIFIED | 403 | Verify the account email before using this feature. |
NOT_FOUND | 404 | The resource does not exist or belongs to another account. |
CONFLICT | 409 | The request conflicts with the current state (e.g. a duplicate, or a request with the same Idempotency-Key still in progress). |
IDEMPOTENCY_CONFLICT | 409 | The Idempotency-Key was already used with a different request body. |
RATE_LIMITED | 429 | Too many requests. Wait for the time in the Retry-After header. |
INSUFFICIENT_BALANCE | 402 | Wallet balance is lower than the cost of the request. |
INVALID_RECIPIENT | 422 | The number is not a valid Bangladesh mobile number, or is blocked. |
SENDER_ID_NOT_APPROVED | 422 | The sender_id is not approved for your account. |
CONTENT_BLOCKED | 422 | The message matched a content rule or needs review. |
MESSAGE_TOO_LONG | 422 | The message exceeds the maximum number of segments. |
RECIPIENT_SUPPRESSED | 422 | The recipient opted out of promotional messages. |
QUIET_HOURS | 422 | Promotional messages cannot be sent at this time (Asia/Dhaka). |
DAILY_LIMIT_EXCEEDED | 429 | The request would exceed your daily sending limit. |
MONTHLY_LIMIT_EXCEEDED | 429 | The request would exceed your monthly sending limit. |
PAYMENT_FAILED | 402 | A payment could not be completed or verified. |
PROVIDER_ERROR | 502 | The upstream SMS provider returned an error. |
PROVIDER_NOT_CONFIGURED | 503 | No SMS provider is configured for this platform. |
FEATURE_DISABLED | 403 | This feature is not enabled. |
SERVICE_UNAVAILABLE | 503 | Temporarily busy. Retry after the Retry-After seconds (with the same Idempotency-Key for sends). |
INTERNAL_ERROR | 500 | Unexpected server error. Safe to retry with the same Idempotency-Key. |
Handling errors#
- 4xx errors other than 409 and 429 will not succeed if retried unchanged. Fix the request.
- For 429, wait for the
Retry-Afterseconds. - For 5xx and network errors, retry with backoff using the same
Idempotency-Key.