eSMS AfricaeSMS Africa
Help

Error Codes

Complete list of API error codes and how to handle them.

HTTP status codes

StatusMeaning
200Success
400Bad request - invalid input
401Unauthorized - missing or invalid API key
403Forbidden - valid key but insufficient scope
404Not found
409Conflict - e.g. retrying a message that isn't failed
422Unprocessable - valid request but business rule violation
429Too many requests - rate limit exceeded
500Internal server error

Error response format

{
  "detail": {
    "code": "insufficient_balance",
    "message": "Insufficient balance. Required: 35 UGX, available: 10 UGX"
  }
}

Validation errors return an array:

{
  "detail": [
    {
      "loc": ["body", "to"],
      "msg": "field required",
      "type": "value_error.missing"
    }
  ]
}

Common error codes

Send errors

CodeStatusDescriptionResolution
invalid_phone400Phone number cannot be parsedUse E.164 format: +256712345678
no_route400No active route for this countryCheck Coverage & Pricing
insufficient_balance422Wallet balance too lowTop up
sender_id_not_approved403Sender ID not approved for this countryUse an approved sender ID or omit the field
text_too_long400Message text exceeds maximum lengthSplit into shorter messages

Authentication errors

CodeStatusDescriptionResolution
invalid_api_key401Key not found or revokedCreate a new API key
expired_token401JWT session expiredRe-login to the portal
insufficient_scope403Key doesn't have required scopeCreate a key with the needed scope

Contact list errors

CodeStatusDescription
no_phone_column400CSV has no recognizable phone column
empty_list400CSV has no valid rows after processing
file_too_large400CSV exceeds 50 MB limit

Retry errors

CodeStatusDescription
not_retryable409Message is not in a failed state
max_retries_exceeded409Message has reached maximum retry count

DLR status codes

These are carrier-level delivery report codes returned in webhook payloads and message timelines.

DLR StatusMeaningMessage Status
DELIVRDDelivered to handsetdelivered
DELIVEREDDelivered (alternate format)delivered
ACCEPTDAccepted by carriersent
ENROUTEEn route to handsetsent
ESME_ROKGateway acknowledgedsent
UNDELIVUndeliverablefailed
REJECTDRejected by carrierfailed
EXPIREDMessage TTL expiredfailed
FAILEDGeneric failurefailed
SUBMIT_FAILSubmission failedfailed (retried)
THROTTLEDCarrier throttledfailed (retried)

Rate limiting

If you exceed the rate limit, you receive:

HTTP/1.1 429 Too Many Requests
Retry-After: 15

Wait the number of seconds in Retry-After before retrying. For high-volume use cases, contact support to increase your limits.

On this page