Error codes
Every error response includes a machine-readable code alongside the HTTP status.
| Code | HTTP status | Description |
|---|---|---|
| unauthorized | 401 | API key is missing, invalid, or revoked. |
| account_not_active | 403 | The account that owns the API key is restricted or suspended. |
| validation_error | 400 | The request body failed validation (missing or malformed fields). |
| payload_too_large | 413 | The request body exceeds the size limit. |
| domain_not_verified | 422 | The from address's domain has not completed SPF/DKIM verification. |
| invalid_recipient | 422 | One or more recipient addresses failed validation. |
| suppressed_recipient | 422 | A recipient is on your suppression list (bounced or complained) and was not sent to. |
| sending_limit_exceeded | 429 | The account's monthly sending limit would be exceeded by this request. |
| sending_not_configured | 503 | Sending is temporarily unavailable because the sending provider is not configured. |
| internal_error | 500 | An unexpected error occurred. Safe to retry with the same idempotency_key. |
Retry guidance
sending_limit_exceeded and internal_error are safe to retry with exponential backoff (a limit error only clears when the limit resets). Validation errors like invalid_recipient or domain_not_verified will fail identically on retry until the underlying issue is fixed — retrying immediately just wastes a request.