Errors
The envelope
Every failure — on any endpoint — returns the same JSON envelope with the failure's HTTP status:
{
"error": {
"code": "…",
"message": "…"
}
}
codeis a stable machine-readable string (quota_exceeded,contact_exists, …) — switch on this.messageis a human-readable explanation in English. It is not contractual and may evolve.reasonis optional and only appears onaccount_suspendederrors returned to session/auth requests: an admin-provided note explaining the suspension (also shown on the dashboard's suspension notice).
When several things are wrong at once, only the last detected error is reported — fix and re-submit to see the next one.
Error codes
| Status | Code | When |
|---|---|---|
| 400 | bad_request | Malformed JSON or a missing/invalid field — messages are generic (email is required, invalid request body), never validator internals; also invalid cursor/limit and a click-tracking URL off the sending domain |
| 400 | weak_password | Register / password reset / password change rejected by the password policy: 10–72 chars, not containing the email local-part, not a common or breached password |
| 400 | invalid_from | From address cannot be parsed |
| 400 | batch_too_large | >100 emails per batch; >1000 contacts per bulk upsert |
| 400 | invalid_params | Missing/unknown template parameter slot |
| 401 | unauthorized | Missing/invalid/revoked key, or session token where a key is required |
| 402 | quota_exceeded | Send or contact allowance reached |
| 429 | rate_limited | Daily send limit exceeded for a Free team (default 300 per UTC day during its first week; custom overrides possible; paid teams are unlimited) — retry after the Retry-After response header (seconds); batch items carry this code per item without the header |
| 429 | rate_limited | Auth endpoint rate limit exceeded (per client IP — login, register, password forgot/reset, verify/resend and OAuth; default 10 requests per 60 s) — retry after the Retry-After response header (seconds) |
| 403 | insufficient_scope | Key lacks the route's scope |
| 403 | account_suspended | The key's team owner or creator is suspended — the key is blocked (not revoked) until that user is unsuspended |
| 403 | email_not_verified | Account email unverified — sends are disabled until verified, and so are dashboard mutations: API key create/revoke, domain create/delete/verify, and all billing mutations; request a new link via POST /v1/auth/verify/resend |
| 403 | domain_not_allowed | Key bound to a different domain than the From address resolves to |
| 404 | contact_not_found | No contact with that email |
| 409 | contact_exists | Duplicate create |
| 409 | contact_suppressed | bounced/complained contact cannot be resubscribed |
| 422 | from_domain_not_verified | From domain matches no verified team domain |
| 500 | internal | Unexpected server error |
Per-item errors in batch and bulk responses
Batch and bulk endpoints never fail wholesale for one bad item. Each item in the response is independently either an acceptance or an error, using the same code/message pair:
{
"index": 2,
"error": {
"code": "from_domain_not_verified",
"message": "no verified domain matches the from address"
}
}
index is the item's position in the request array (0-based). See Sending batches for the full decode.
Worked examples
401 unauthorized — no key, an invalid key, or a session token where an API key is required:
{
"error": {
"code": "unauthorized",
"message": "missing or invalid api key"
}
}
403 insufficient_scope — a valid key without the route's scope:
{
"error": {
"code": "insufficient_scope",
"message": "api key lacks the emails:send scope"
}
}
409 contact_exists — creating a contact whose email already exists:
{
"error": {
"code": "contact_exists",
"message": "contact already exists"
}
}
400 batch_too_large — more than 100 emails in one batch call:
{
"error": {
"code": "batch_too_large",
"message": "batch is limited to 100 emails"
}
}
429 rate_limited — the team's daily send cap is reached. The response carries a Retry-After header with the seconds until the next UTC day. A rate_limited response has this envelope:
{
"error": {
"code": "rate_limited",
"message": "send rate limit exceeded; retry after 1 seconds"
}
}
In a batch call the daily limit is applied per item: once the cap is reached, the remaining items fail with rate_limited in their per-item result (no Retry-After header). See Quotas and limits.
code, never on message. code values are stable API surface; message strings are diagnostics that can change at any time.