The PristineSend API uses conventional HTTP status codes to indicate success or failure. Every /api/v1/* error response shares one envelope, and this page is the canonical reference other pages point to.
Every non-2xx response body is a JSON object with a single error object. The HTTP status carries the category; the machine-readable code carries the specifics.
| Field | Description |
|---|---|
code | Stable, machine-readable code from the closed set below. Branch on this. |
message | Human-readable, safe to show. May change — do not match on it. |
param | Present only on field-validation errors; names the offending field. |
request_id | Always present; mirrors the X-Request-Id response header. |
internal_error and provider_error always return a generic message — the underlying detail is logged server-side and never returned.
Every response — success and error — carries an X-Request-Id header (e.g. req_8f3c9a1b2d4e5f6071829304). On errors the same value also appears as error.request_id in the body. Capture and log it: it lets support trace a specific call.
The complete set of code values, with the HTTP status each maps to. Some codes set extra headers (Retry-After on 429/503).
| Status | code | When |
|---|---|---|
| 400 | invalid_request | Malformed or unparseable request body. |
| 400 | missing_field | A required field is absent. Sets param to the field name. |
| 400 | invalid_field | A field is present but invalid (bad email, wrong type, malformed cursor). Sets param. |
| 400 | idempotency_key_invalid | The Idempotency-Key header was sent but empty, or longer than 255 characters. |
| 401 | unauthorized | Missing, malformed, unknown, or revoked API key (never reveals which). |
| 402 | overage_cap_reached | The account has used its monthly email allowance and its wallet can't pay for more emails. Nothing was sent. Add money to the wallet in Settings → Billing, then send again. |
| 403 | account_not_approved | The workspace is not yet approved for sending. |
| 403 | account_suspended | The workspace is suspended. |
| 403 | sending_paused | Sending is paused for the workspace. |
| 403 | transactional_paused | Transactional sending is paused for review (does not affect campaigns or read endpoints). |
| 403 | insufficient_scope | The key is valid but does not carry the scope this endpoint requires. The message names the missing scope. Mint a key with it in Settings → Developer — see Authentication. |
| 403 | domain_not_verified | The send-gate found no verified sending domain. |
| 403 | recipient_suppressed | The recipient address is on your suppression (do-not-send) list. On /send/batch this appears as a per-item error rather than a whole-request 403. |
| 403 | sender_not_verified | The supplied from — or the sender_id's domain — is not verified for your workspace. On /send/batch this appears as a per-item error. |
| 403 | plan_limit_reached | Adding this contact would exceed your plan's active-contact limit. Remove contacts or upgrade to add more. |
| 403 | subscription_inactive | The workspace's paid subscription has lapsed (canceled or unpaid). Sending is blocked until billing is updated; your data is intact. |
| 403 | crm_not_enabled | The account hasn't turned the CRM on yet, or (for deals and the pipeline) hasn't set up its pipeline. Someone in the team does that once, in PristineSend. |
| 403 | live_key_required | A test key (ps_test_) tried to create a deal or move one to another stage, or to add a contact with double opt-in. A deal entering a stage can start an automation that sends real email, and a confirmation is real email, so these need a live key. |
| 403 | double_opt_in_unavailable | A contact with double_opt_in could not be taken: signup forms are turned off for your account, no mailing address is set, or confirmations bounced or were marked as spam too often in the last 24 hours (the message gives the numbers; it lifts by itself). See Contacts → Double opt-in. |
| 404 | not_found | The resource does not exist in this workspace (a non-UUID id also returns 404). |
| 404 | sender_not_found | The sender_id does not exist in your workspace (wrong or cross-tenant id). On /send/batch this appears as a per-item error. |
| 409 | conflict | A state conflict, e.g. a contact with that email already exists, or a campaign draft that changed since the version you read (read it again and redo your change). |
| 409 | idempotency_key_in_progress | A concurrent request with the same Idempotency-Key is still processing. Retry shortly. |
| 422 | idempotency_key_reused | The same Idempotency-Key was sent with a different request body. The key is valid, but the params conflict. |
| 422 | recipient_cap_reached | The recipient has already had the account's limit of emails for the last 24 hours or 7 days (5 and 15 unless the account changed them). Applies to agents connected through MCP and to API keys that opted in. Nothing was sent; do not retry until the window has passed. |
| 422 | recipient_burst | This would be the third near-identical email to the recipient within 10 minutes, which usually means something is sending in a loop. Nothing was sent. Same scope as recipient_cap_reached. |
| 422 | content_unfinished | Strict mode only (see /docs/strict-mode): the email has a placeholder link or picture, an empty picture spot, or no subject. Nothing was sent. Fix the content and send again. |
| 422 | address_rejected | Strict mode only: the recipient's address check says it is misspelt, a throwaway address, not deliverable, or likely to bounce. Nothing was sent, and the email is logged as skipped. |
| 402 | verification_allowance_exhausted | Strict mode only: checking a new address needs a verification, and the account has no free verifications left this month and too little money in its wallet to pay for it. Add money to the wallet in Billing, or send with a key that is not strict. |
| 413 | message_too_large | The whole message — bodies plus attachments, after encoding — is past the ceiling of the provider that sends your domain. The message states the limit that applied. Host large files and pass a url attachment instead. |
| 429 | rate_limited | Too many requests — the per-key rate limit (1000/minute) was exceeded. Sets Retry-After. |
| 502 | provider_error | The email provider rejected the message. Generic message; detail is logged server-side. |
| 503 | service_unavailable | Something we need for the request is briefly unavailable, such as metering, checking your API key or access token, reading your account's status, or, on a send, reading your sender and sending-domain settings. Nothing was sent or saved. Retryable: send endpoints set Retry-After, and a retry with the same Idempotency-Key is processed afresh. |
| 503 | suppression_unverifiable | On /send/batch only: the do-not-send list couldn't be read, so the whole batch was refused rather than risk mailing a suppressed address. Nothing was sent and nothing was metered. Retryable. A single send fails open instead — a suppression lookup must not block a password reset. |
| 503 | rate_limit_unavailable | The rate-limit check couldn't be evaluated on a cost-bearing or bulk request (deliverability check, batch send), which we fail closed rather than run unmetered. Retryable; sets Retry-After. Single sends fail open instead. |
| 500 | internal_error | An unexpected server fault. Generic message; safe to retry with backoff. |
The three idempotency_key_* codes only appear when you send an Idempotency-Key header — see Idempotent requests for how keys, replays, and these codes work.
Two limits are easy to confuse. overage_cap_reached (402) is about money: your plan's monthly email allowance is used and the wallet can't pay for more emails, so retrying soon does not help. It clears once money is added to the wallet or the allowance renews. The code keeps its name so existing clients keep working. rate_limited (429) is a rate limit that clears with time — honour Retry-After and retry.
Branch on the HTTP status and error.code rather than the message, which may change. Retry 429 after Retry-After and 5xx with exponential backoff: