Skip to content

Errors

Every error returns the same shape, so you can handle failures in one place. The HTTP status tells you what kind of problem it is; the code tells you exactly which one.

Draft documentation. Codes may be added before the beta.

The shape

{
  "error": {
    "code": "validation_error",
    "message": "Enter a valid email address."
  }
}

Read message for a human-readable explanation. The code is stable; the message may be reworded. Error responses are sent with Cache-Control: no-store.

Codes

CodeStatusMeaning
unauthorized401The key is missing, malformed, revoked or wrong, or the owning account no longer exists.
forbidden403The key is valid but the action is disabled, such as MCP actions being turned off.
not_found404The resource does not exist or is not yours.
validation_error400 / 422The body or query has a missing or invalid field, or the email domain cannot receive mail.
conflict409The action conflicts with current state, such as a duplicate email, tag or segment name.
confirmation_required409The send targets the entire audience and needs `confirm: true`.
complained409The contact reported spam and cannot be resubscribed.
payment_required402The account has no plan. Choose a plan to send email or collect contacts.
plan_limit402The action would exceed the plan's email or contact allowance. Upgrade to continue.
rate_limited429Too many requests. Retry after the given delay.
service_unavailable503A required service is unavailable, such as the job queue or image provider. Safe to retry.
internal_error500Something broke on our side. It is safe to retry.

Public pages and signup forms return 404 when the newsletter no longer exists or its owner account has been deleted, even if the URL is still correct.

Confirming large sends

Sending to an entire audience is irreversible. When a request targets audience.type: "everyone" without "confirm": true, the API returns 409 confirmation_required and does not queue anything.

{
  "error": {
    "code": "confirmation_required",
    "message": "Sending to the entire audience requires confirm: true."
  }
}

Retries

  • Retry 429, 503 and 500 with exponential backoff.
  • Do not retry other 4xx errors. Fix the request first. A 409 conflict means the resource already exists or the current state does not allow the action.
  • A 409 complained contact must be handled by your own consent process; the API will keep rejecting a resubscribe.
  • Campaign sends are de-duplicated by campaign state: a campaign with status sent, sending or scheduled cannot be sent again.
  • When creating resources through a retry, check for an existing resource first. Creating a second campaign or API key is not idempotent.

Partial delivery failures

A campaign send can succeed at the API level while some recipients fail later. The request returns 202 Accepted. Poll GET /api/v1/campaigns/:id and read status, stats.bounced and stats.delivered. A campaign is marked failed only when every email failed or the audience was empty.