Skip to content

Error Codes Reference

Complete list of all SendAPI error codes, their causes, and recommended remediation steps.

HTTP Status Codes

HTTP CodeMeaning
200 OKRequest succeeded
201 CreatedResource created
400 Bad RequestInvalid request body or parameters
401 UnauthorizedMissing or invalid API key
403 ForbiddenValid key but insufficient permissions
404 Not FoundResource not found
409 ConflictConflict with existing resource
410 GoneResource expired (e.g., OTP)
422 Unprocessable EntityValidation error
429 Too Many RequestsRate limit exceeded
402 Payment RequiredQuota exceeded, plan upgrade needed
500 Internal Server ErrorUnexpected server error

Error Response Format

All errors return a consistent JSON structure:

json
{
  "success": false,
  "error": {
    "type": "rate_limit_exceeded",
    "message": "Rate limit exceeded. Try again in 12 seconds.",
    "code": 4029
  },
  "meta": {
    "request_id": "req_01H9...XQ",
    "timestamp": "2026-03-09T14:30:00.000000Z"
  }
}

Authentication Errors (401, 403)

CodeTypeDescriptionFix
4010missing_api_keyNo Authorization header providedAdd Authorization: Bearer sk_live_... header
4011invalid_api_keyAPI key is malformed or not recognizedCheck the key value — it should start with sk_live_
4012revoked_api_keyThe API key has been revokedCreate a new key in the dashboard
4013expired_api_keyThe key's expiry date has passedCreate a new key in the dashboard
4030insufficient_scopeKey lacks permission for this endpointIssue a key with the required scope

Quota and Billing Errors (402, 429)

CodeTypeDescriptionFix
402email_quota_exceededMonthly email quota reachedUpgrade your plan
402subscription_requiredNo active subscriptionSubscribe to a plan
402subscription_expiredTrial expired or subscription cancelledRenew or upgrade
4021sms_balance_lowInsufficient SMS credit balanceTop up credits in billing dashboard
4029rate_limit_exceededToo many requests per minuteBack off and retry after the Retry-After header

Validation Errors (400, 422)

CodeTypeDescriptionFix
422validation_errorGeneric validation failureCheck the errors field for field-level details
4001invalid_phonePhone number is not validUse the Phone Validation endpoint to normalize
4002invalid_sessionsession_id does not exist or is not yoursList sessions to find the correct ID
4003session_not_connectedSession exists but is not connectedCheck session status; re-pair if disconnected
422invalid_fromThe from value is not a valid RFC 5322 emailUse email@domain or "Name <email@domain>"
422invalid_from_domainDomain in from is not verified on your accountVerify the domain in Email Domains or omit from

OTP / Verify Errors

CodeTypeDescriptionFix
404not_foundNo pending OTP exists for the recipientSend a new OTP first
4291rate_limit_exceededMore than 5 OTPs sent to this phone in the last hourWait up to an hour before resending
4292daily_limit_exceededMore than 20 OTPs sent to this phone todayWait until 24h after the first send

Authentication / Verification Gate Errors (403)

CodeTypeDescriptionFix
403email_not_verifiedAccount email is not verifiedClick the verification link sent at signup
403admin_requiredAdmin-only endpointThis endpoint is internal — not for end-user keys

Server Errors (500)

CodeTypeDescriptionFix
5000internal_errorUnexpected server errorRetry with exponential backoff; contact support if persistent
5001provider_errorDownstream SMS/WhatsApp provider errorRetry; check the dashboard for system status

Released under the MIT License.