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.
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
| Code | Status | Meaning |
|---|---|---|
| unauthorized | 401 | The key is missing, malformed, revoked or wrong, or the owning account no longer exists. |
| forbidden | 403 | The key is valid but the action is disabled, such as MCP actions being turned off. |
| not_found | 404 | The resource does not exist or is not yours. |
| validation_error | 400 / 422 | The body or query has a missing or invalid field, or the email domain cannot receive mail. |
| conflict | 409 | The action conflicts with current state, such as a duplicate email, tag or segment name. |
| confirmation_required | 409 | The send targets the entire audience and needs `confirm: true`. |
| complained | 409 | The contact reported spam and cannot be resubscribed. |
| payment_required | 402 | The account has no plan. Choose a plan to send email or collect contacts. |
| plan_limit | 402 | The action would exceed the plan's email or contact allowance. Upgrade to continue. |
| rate_limited | 429 | Too many requests. Retry after the given delay. |
| service_unavailable | 503 | A required service is unavailable, such as the job queue or image provider. Safe to retry. |
| internal_error | 500 | Something 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,503and500with exponential backoff. - Do not retry other 4xx errors. Fix the request first. A
409 conflictmeans the resource already exists or the current state does not allow the action. - A
409 complainedcontact 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,sendingorscheduledcannot 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.