Skip to content

Errors

Errors return a machine-readable code alongside a human-readable message. Branch on the code — messages are written for people and may be reworded.

422 Unprocessable Entity · json
{
  "error": {
    "code": "validation_error",
    "message": "Request body failed validation",
    "fields": [
      { "path": "to", "message": "at least one recipient" }
    ]
  }
}

Codes

CodeHTTPMeaning
missing_api_key401No Authorization header was sent.
invalid_api_key401The key is malformed, unknown, or revoked.
insufficient_scope403The key lacks a required scope.
organization_paused403Sending is paused for this organization.
domain_not_owned403The From domain has not been added to this organization.
domain_not_verified403The domain exists but has not completed DNS verification.
sandbox_recipient_not_verified403This recipient has not confirmed they want your mail. Applies to new accounts only.
not_found404No such resource, or it belongs to another organization.
organization_not_provisioned409The organization's sending infrastructure does not exist yet.
idempotency_conflict409The key was reused with a different body, or is in flight.
message_too_large413The message or its attachments exceed the size limit.
validation_error422The request body failed validation. See fields.
missing_field422A required field was absent.
recipient_suppressed422A recipient is suppressed after a hard bounce or complaint.
rate_limit_exceeded429Too many requests. See Retry-After.
monthly_quota_exceeded429The monthly send limit is spent. It resets on the 1st, 00:00 UTC.
daily_quota_exceeded429The daily send quota is exhausted. Resets at 00:00 UTC.
provider_error502An upstream mail provider rejected the request.
internal_error500Something went wrong. The reference maps to a log line.

What to retry

Retry 429, 502 and 500 with exponential backoff. Every4xx other than 429 is a request that will fail identically forever — retrying it only consumes your rate limit.

Retry safely

Send an Idempotency-Key on every send. A retry after a timeout then replays the original response instead of delivering a second copy to your customer.

Request references

Every response carries sreemail-request-id, and a 500 repeats it in the error message. Quote it in a support request and it maps directly to a log line.

Delivery failures are not errors

A 202 means accepted, not delivered. A bounce, a complaint or an upstream rejection happens after the response and reaches you as an event: email.bounced, email.complained, email.rejected or email.failed. Register a webhook or you will never learn about them.