Errors
The error format of the exx.sh API, which errors to retry and which to fix, and every error name with its HTTP status.
When the API refuses a request, it answers with an HTTP status and a JSON body in Resend's
format: the status again, a stable name and a message for people.
{ "statusCode": 422, "name": "missing_required_field", "message": "Missing `subject` field." }Match on name in your code, never on the message: messages may change wording, names do
not. The SDKs keep name as the API sent it. A request that got no answer at all, such as a
timeout, becomes application_error with no status in the SDKs.
Retry or fix
Each error belongs to one of four groups, and the group decides what your code does next:
| Answer | What to do |
|---|---|
400, 401, 403, 404, 405, 422 | Fix the request. Sending it again gets the same answer. |
409 concurrent_idempotent_requests | The first request with this Idempotency-Key is still running. Retry the same request after a moment. |
409 invalid_idempotent_request | This Idempotency-Key was used with another body. Use a new key for a new email. |
429 rate_limit_exceeded | Wait the seconds in retry-after, then retry. |
429 daily_quota_exceeded, 429 monthly_quota_exceeded | Stop until the next UTC day or month (rate limits and quotas). |
500, 503, or no answer | Retry with a growing wait, with the same Idempotency-Key so the email is sent once. |
The SDKs follow this table for you: they retry rate limits, server errors and timeouts, and
add an Idempotency-Key to every send they may retry. Retries and
idempotency explains the key.
The request id
Every answer to a request made with a valid API key carries an x-request-id header, an
error included. Keep it with your own logs: it names the request in your project's
request logs in the dashboard (method, path, status, timing, key,
client address; never the body),
and it is the fastest way to point support at one request.
Every error
| Status | Name | Example message |
|---|---|---|
| 400 | invalid_idempotency_key | Idempotency keys, if present, must have between 1 and 256 characters. |
| 400 | validation_error | An error was found with one or more fields in the request. |
| 400 | exx_challenge_failed | Complete the challenge: `turnstile_token` is missing or was refused. |
| 400 | exx_invalid_code | The code or passkey answer is not valid. |
| 401 | missing_api_key | Missing API Key |
| 401 | restricted_api_key | This API key is restricted to only send emails. |
| 401 | validation_error | API key is invalid |
| 401 | exx_unauthorized | Log in to continue. |
| 403 | validation_error | The `{domain}` domain is not verified. Please, add and verify your domain. |
| 403 | exx_project_paused | This project is paused: {reason} |
| 403 | exx_account_suspended | This account is {status}. |
| 403 | exx_sandbox_restricted | The sandbox sender is restricted: {why}. |
| 403 | exx_invalid_csrf_token | The `X-CSRF-Token` header is missing or does not match the session. |
| 403 | exx_insufficient_role | This needs the `owner`, `admin` or `developer` role in the organization. |
| 403 | exx_free_org_limit | You already own an organization on the free plan; upgrade it to create more. |
| 403 | exx_invalid_signature | This download link is not valid. |
| 403 | exx_email_quarantined | This email is held for review: its attachments and raw message can be downloaded once it is released. |
| 403 | exx_forbidden_source | The admin API is reachable from the staff network only. |
| 403 | exx_second_factor_required | Confirm with your passkey or authenticator code first. |
| 403 | exx_domain_limit | The organization's plan allows {cap} domains; remove one or change the plan. |
| 403 | exx_tracking_hostname_limit | The plan allows {cap} tracking hostnames per project; remove one or change the plan. |
| 404 | not_found | The requested endpoint does not exist. |
| 405 | method_not_allowed | Method is not allowed for the requested path. |
| 409 | concurrent_idempotent_requests | There is another request in progress with the same idempotency key. |
| 409 | invalid_idempotent_request | This idempotency key has been used with this HTTP method and endpoint within the last 24 hours, but the request body was modified and doesn't match the original request. |
| 409 | exx_subscription_active | Cancel the subscription first; the organization can be deleted once it has ended. |
| 409 | exx_org_deleted | The organization is deleted: it can no longer subscribe. |
| 409 | exx_delivery_pending | This delivery is still being sent; replay it once it has finished. |
| 409 | exx_webhook_disabled | Enable the webhook before replaying its deliveries. |
| 409 | exx_contact_exists | A contact with this email address already exists. |
| 409 | exx_already_member | `{email}` is already a member of this organization. |
| 409 | exx_invite_in_progress | Another invite of this organization is being sent; try again in a moment. |
| 409 | exx_property_deleting | The property `{key}` is still being deleted; create it again once its values are gone. |
| 409 | exx_property_in_use | The property `{key}` is used by the segment `{name}`; change or delete the segment first. |
| 409 | exx_topic_in_use | The topic `{name}` is used by the segment `{segment}`; change or delete the segment first. |
| 409 | exx_export_in_progress | This project already has {count} exports in progress; ask again once one is ready. |
| 409 | exx_import_in_progress | This project has an import in progress; upload the next file once it is done. |
| 409 | exx_property_changed | The property `{key}` was deleted or changed type during the import. |
| 409 | exx_review_decided | This item was already decided. |
| 409 | exx_project_not_changed | The project is {status}, not {wanted}. |
| 409 | exx_hostname_not_failed | The hostname is {status}: only a failed one is made again. |
| 409 | exx_not_dead | Job {id} is not dead. |
| 409 | exx_ip_not_changed | {ip} is not quarantined. |
| 409 | exx_broadcast_state | Only a draft broadcast can be sent; this one is {state}. |
| 410 | exx_link_expired | This sign-in link has expired or was already used. |
| 413 | exx_file_too_large | The file must be at most {max} bytes. |
| 422 | invalid_attachment | Attachment must have either a `content` or `path`. |
| 422 | invalid_parameter | The `{parameter}` must be a valid UUID. |
| 422 | invalid_region | The region `{region}` is not available. |
| 422 | missing_required_field | The request body is missing one or more required fields. |
| 422 | validation_error | An email to test addresses only may be at most {max} bytes. |
| 422 | exx_content_refused | The message links to domains on spam blocklists and was refused. |
| 422 | exx_broadcast_blocked | The broadcast does not pass its checks ({ids}): see POST /broadcasts/{id}/check. |
| 429 | daily_quota_exceeded | You have exceeded your daily email sending quota. |
| 429 | monthly_quota_exceeded | You have exceeded your monthly email sending quota. |
| 429 | rate_limit_exceeded | Too many requests. Please limit the number of requests per second. |
| 429 | exx_signup_limited | Too many accounts were created from this network today. |
| 500 | application_error | An unexpected error occurred. |
| 503 | service_unavailable | API is temporarily unavailable |
| 503 | exx_challenge_unavailable | The sign-in check is unavailable right now. Try again shortly. |
| 503 | exx_billing_unavailable | Billing is not configured on this deployment. |
| 503 | exx_stream_unavailable | No IP pool can send the {stream} stream yet. Please try again later. |
| 503 | exx_marketing_pool_unavailable | No IP of the marketing pool can send broadcasts yet. Please try again later. |
Common questions
Why does an invalid key answer 401 on one endpoint and 400 on another?
Resend does the same, and exx.sh keeps its behaviour so that Resend code works unchanged: an
unknown, revoked or malformed key answers 401 on POST /emails and POST /emails/batch
and 400 elsewhere, both named validation_error.
What does 403 validation_error "domain is not verified" mean?
The from address is on a domain that is not verified in this project. Verify it
(domains guide) or send from a domain that is.