Core concepts

Errors

HTTP status codes and the full error-code reference: what each means and how to fix it.

Every error returns a non-2xx status and a JSON body with a stable machine code.

Branch on error.code — the codes are stable; the messages may change. The error envelope is always:

json
{ "error": { "message": "Human-readable explanation.", "code": "machine_code" } }

HTTP status codes

StatusMeaningWhen
200OKRequest succeeded (reads, updates).
201CreatedA new resource was created.
202AcceptedSend/queue accepted for processing.
400Bad RequestInvalid JSON or failed validation.
401UnauthorizedMissing, invalid, or revoked key.
403ForbiddenScope, suspension, or sender/domain block.
404Not FoundNo such resource in this project.
409ConflictSuppressed address or duplicate.
429Too Many RequestsRate limit or send-quota exceeded.
500Server ErrorUnexpected error on our side.
502Bad GatewayUpstream email provider failed.

Error code reference

CodeHTTPWhat it meansHow to fix it
unauthorized401No key was sent, or it's wrong, revoked, or doesn't start with m123_.Send Authorization: Bearer m123_…. If revoked, create a new key.
insufficient_scope403A sending-only key was used on an endpoint that needs full access.Use a Full access key for that endpoint.
suspended403The project this key belongs to is suspended.Contact support — sending and management are paused.
forbidden403The from isn't on a verified domain, the domain has an open deliverability issue, or auto-pause is active.Verify your sending domain, resolve flagged DNS recommendations, then retry.
validation_error400Invalid JSON, a missing required field, or a value that failed validation.Read the message — it names the offending field — and correct the request.
not_found404No contact, campaign, or template with that id exists in this project.Check the id and that it belongs to the same project as the key.
conflict409The address is suppressed, or another contact already uses that email.Don't re-send to suppressed addresses; update the existing contact instead.
rate_limit_exceeded429More than 10 requests per second were made with this key.Back off and retry after the seconds in the Retry-After header.
quota_exceeded429Your plan's daily or monthly send limit is used up.Wait for the window to reset, or upgrade your plan.
send_failed502The upstream email provider rejected or failed the send.Retry; if it persists, check the message and your sender configuration.
internal_error500An unexpected error on our side.Retry with backoff. If it keeps happening, contact support.