Skip to content

Reference

Errors

Every error has an HTTP status and a stable name you can match on.

Errors return a non-2xx status and a JSON body. Match on name; message is for people and may change.

Error response
JSON
{
  "statusCode": 422,
  "name": "validation_error",
  "message": "The `from` address must be on a verified domain."
}
NameStatusMeaning
validation_error422A field is missing or invalid. The message says which.
missing_api_key401The Authorization header is missing.
invalid_api_key403The API key is wrong, revoked, or malformed.
restricted_api_key401The key only has sending access, or is limited to another domain.
not_found404The resource doesn't exist in this workspace.
method_not_allowed405The path doesn't accept this HTTP method.
invalid_idempotency_key400The Idempotency-Key header is empty or longer than 256 characters.
invalid_idempotent_request409The Idempotency-Key was already used with a different request body.
concurrent_idempotent_requests409A request with the same Idempotency-Key is still being processed.
invalid_attachment422An attachment couldn't be read, fetched, or is too large.
rate_limit_exceeded429Too many requests. Wait for retry-after seconds.
monthly_quota_exceeded429The workspace reached its monthly send cap.
workspace_paused403Sending is paused for the workspace, for billing or reputation reasons.
application_error500Something went wrong on our side. Retry later.

Retrying

  • Retry 429 after retry-after seconds, and 500 with backoff.
  • Use an idempotency key on sends so retries can't send twice.
  • Don't retry other 4xx errors unchanged. Fix the request first.