Error codes
Every error is a JSON problem document with a stable code. Branch on the code: the title and detail are for people.
Request error codes
- 401unauthenticatedAuthentication required
- 401mfa_requiredMulti-factor authentication required
- 403forbiddenForbidden
- 403insufficient_scopeInsufficient scope
- 403ip_not_allowedIP address not allowed
- 403email_not_verifiedEmail address not verified
- 403tenant_suspendedAccount suspended
- 404not_foundNot found
- 409invalid_state_transitionInvalid state transition
- 409idempotency_key_reusedIdempotency key reused
- 409conflictConflict
- 402insufficient_balanceInsufficient balance
- 413payload_too_largePayload too large
- 415unsupported_media_typeUnsupported media type
- 422validation_errorValidation error
- 422too_many_recipientsToo many recipients
- 422sender_id_not_approvedSender ID not approved
- 422pricing_not_configuredPricing not configured
- 429rate_limitedToo many requests
- 500internal_errorInternal error
- 503service_unavailableService unavailable
Problem types in the dashboard
These refine a code so the dashboard can react on its own. The code is still the one to branch on.
Message error codes
A message's error.code says why it did not reach the handset. It appears on the message, in its status history, and per recipient in a send's response.