Errors
The error envelope, rate limits, and how to handle failures from the HTTP API.
Every /v1 operation reports failures with one JSON envelope, declared as
ApiErrorResponse in the OpenAPI document:
Branch on the HTTP status and code. Codes are stable lowercase snake_case.
Messages are safe, human-readable text that may change, so never parse them. Error
responses never include internal details, and the X-Request-ID header identifies
the request when you report a problem.
Common codes
| Status | Code | Meaning |
|---|---|---|
404 | not_found | The route or resource wasn't found. |
413 | request_too_large | The request body exceeds the operation's limit. |
429 | rate_limited | Request protection limited the operation. Wait for Retry-After. |
500 | internal_error | An unexpected failure. Details are never exposed. |
503 | A feature's *_unavailable code | The feature is temporarily unavailable. Honor Retry-After when present. |
Mail sending restrictions also use 429, with their own codes. A Retry-After header
on a 429 gives the seconds to wait before retrying. Don't retry in a tight loop.
Handle a failure
- A conflict means the resource changed, or the request differs from an earlier one with the same identity. Read current state before deciding what to do; never retry with a new identity or revision just to get past it.
- A timeout or lost response doesn't prove the request failed. Repeat the identical request with the same identity, or read its status. See Operations.
- A permission failure follows the account's current role and each resource's rules. Reconnecting or retrying grants nothing.
- A
429or503is temporary. Resolve any uncertain write before submitting it again.
Feature codes
Each guide documents the codes its operations return:
| Code | Guide |
|---|---|
signup_conflict, recovery_unavailable | SDK signup sequence |
nomination_conflict | Correct or cancel a nomination |
address_unavailable, address_choice_expired | Mailboxes |
key_limit, rotation_conflict | Agent keys |
conflict, invalid_input | Mail sending |
temporary_limited, unsupported_attachment | Send attachments |
billing_conflict | Cancel or resume a subscription |
New codes are added with the features that introduce them. Treat an unrecognized code by its HTTP status.