Platform

Errors

Every /v1 error has one shape, {"error": {"code", "message"}}, with a stable code to branch on and a message to show a person. This page lists the codes, what each status means, and the OAuth endpoints’ own error shape.

The shape

Response 403
{
  "error": {
    "code": "forbidden",
    "message": "This key cannot do that: it needs `send` access or more."
  }
}

Branch on code, never on message: messages are written for people and may change. The SDKs raise PidgeonError with status, code and message.

Codes

StatuscodeMeaning
400invalidThe request is missing a field or has a bad value. The message names it.
401unauthenticatedNo key, an unknown or revoked key, or a suspended account. Send Authorization: Bearer pgn_….
402payment_requiredThe month’s free volume is used and usage billing is off.
403forbiddenThe key’s access is too low, or the thing is not allowed (a revoked agent, another pod).
403heldEmail only: the message is held for a person until a member releases it.
403exfiltration_blockedEmail only: the message carries text a key read in another conversation. Nothing was sent.
404not_foundNo such thing in this account (or this key’s pod), or no such route: a /v1 path the API does not have answers this too.
405method_not_allowedThe route exists but not with this method. Allow lists the methods it takes.
409conflictIt already exists: a published key, a reported verification, a taken address.
409idempotency_in_progressA call with the same Idempotency-Key is still running. Retry-After says when to ask for its answer. Idempotency
422idempotency_key_reusedThis Idempotency-Key was used with a different body, or by another key of the account. Use a new one.
409draft_not_editableEmail only: the draft has moved on (held for approval, scheduled, sent, rejected); the message says which.
429rate_limitedToo many requests for this key, or over a sending limit. Retry-After says when, where it applies.
413too_largeEmail only: a file over 4 MB sent in one request. Use the upload link instead.
502send_failedEmail only: the mail service refused the message.
507storage_fullEmail only: the account’s 10 GB of mail and files is used. Delete conversations to free it.
503unavailableEmail only: the mail service is busy. Try again in a minute.

A body over 4.5 MB

Zurchin runs on Vercel, which refuses any request body over 4.5 MB before Zurchin sees it: 413 with a plain-text body (FUNCTION_PAYLOAD_TOO_LARGE), not the JSON shape above. Check the status before parsing. Only files get that large: over 4 MB, upload one with the upload link, which puts the bytes straight into storage, up to 25 MB.

OAuth endpoints

/oauth/token and /oauth/register answer as OAuth does (RFC 6749 §5.2): {"error": "invalid_grant", "error_description": "…"}.