Reference
Errors
Every code the API and MCP server return, what it means, and how to fix it. Only three are worth retrying.
400 Bad request
401 Unauthenticated
402 Plan
403 Not allowed
404 Not found
409 Conflict
410 Gone
412 Changed
413 Too large
422 Not ready
-
recipient_suppressed: A recipient is on the suppression list -
domain_not_ready: The domain hasn’t finished verifying -
attachment_not_ready: The file hasn’t passed a scan, or failed one -
test_mode_unsupported: This doesn’t exist in test mode -
reserved_address: That name is reserved on the platform domain -
environment_immutable: A project can’t switch between live and test
429 Slow down
503 Unavailable
No codes match “”.
The error body
Errors from the REST API come back in this shape. The status comes from the code, so a code always carries the same status.
{
"error": {
"code": "permission_denied",
"message": "This credential cannot perform that action.",
"request_id": "req_8Kd2x91",
"retryable": false,
"details": {}
}
} - Branch on
code, notmessage. The code is a stable value; the message is written for a person reading a log. - Quote
request_id, or thex-request-idresponse header, when you ask about one request. retryablecan be true only forrate_limited,provider_unavailableandtemporarily_unavailable. Anything else needs something to change first: the request, the account or the resource.detailsadds context on some codes, such asfieldsoninvalid_requestandreason_codesonpolicy_denied. It is an empty object when there is none.
Over MCP
The MCP server sits behind OAuth. A request without a valid access token is refused by the
OAuth layer with a 401 and WWW-Authenticate; an unknown or expired token also
gets an invalid_token body. Past that, the server answers with the body above
when it refuses a call itself, such as a rate limit or a tool the connection can’t use. When
a tool runs and fails, its result is marked isError: true and carries only a
message, as text.
Codes with no page
The contract declares three more codes that nothing returns: daily_limit_exceeded,
source_unavailable and send_already_submitting. The daily recipient
limit is real; it answers policy_denied.