Error codes

The error codes the API returns, the send denial reasons, and what to do about each.

View as MarkdownLast updated

Error responses usually look like {"error": "...", "detail": "..."}. Only branch on error. A first 403 policy_denied response carries decision instead of detail.

HTTP errors

StatuserrorMeaning and what to do
400invalid_requestThe request is malformed. Fix it using detail.
400invalid_recipientAn address can't receive mail in that form. Use plain local@domain addresses.
400idempotency_key_requiredAdd an Idempotency-Key header.
401unauthorizedThe token is missing, wrong, revoked, or expired.
403forbiddenThe token lacks the scope, or you asked for another agent's data.
403policy_deniedThe policy blocked the send. Check decision.reasons (table below).
404message_not_found · thread_not_found · approval_not_found · attachment_not_found · schedule_not_found · audit_not_foundDoesn't exist or can't be seen. Quarantined mail looks the same as missing mail.
409idempotency_key_reusedThe key was used for a different request. Use a new key.
409policy_changingThe policy is being changed. Try again shortly.
422forward_refused_injection_riskForwarding this email was refused. Write a new email in your own words.
429cancel_rate_limitedToo many schedule cancellations. Tell the owner.
502send_failedNothing went out. You can retry with a new idempotency key.

Errors on every path

StatuserrorMeaning and what to do
400invalid_jsonThe body isn't valid JSON.
400invalid_requestA query parameter was given more than once.
404route_not_foundNo such path. Check the path and method.
405method_not_allowedThis path doesn't take that method. The Allow response header lists the ones it takes.
413payload_too_largeRequest bodies can be up to 10 MiB (10,485,760 bytes).
500internal_errorThe server couldn't process the request. detail includes a request ID.
503service_unavailableTemporarily unavailable. detail includes a request ID.

After a 500, a 503, a timeout, or a network error, wait a little and retry with the same Idempotency-Key. Mail that already went out won't go out twice. Under heavy load you may get a 429, whose body may not follow this shape; wait and retry with the same key too. If it keeps happening, contact support with the request ID.

Codes specific to schedules, verification codes, and webhooks are on their pages: Scheduled email, Verification codes, Webhooks.

Common denial reasons

These are the codes you'll see most often in decision.reasons of policy_denied and in MCP denied results. While the cause remains, retrying gives the same result. Retrying with the same idempotency key returns the same denial even after the cause is fixed, so after fixing it, or waiting retry_after_seconds, send with a new idempotency key.

ReasonMeaningWhat to do
recipient_not_allowlistedThe recipient isn't on the outbound allowlist.The owner adds them.
recipient_blocklistedThe recipient is on the outbound blocklist.The owner removes them.
outbound_disabledThe outbound mode is Block all.The owner changes the mode.
recipient_is_selfThe agent tried to email its own address.It can't email itself.
suppression_listThe address has a history of bounces or spam reports.Check the address.
rate_limit_per_minute · rate_limit_per_hour · rate_limit_per_dayA sending limit was reached.Wait, then send.
recipients_per_message · plan_recipients_per_messageToo many recipients in one message.Split it up.
daily_send_limitThe organization's daily sending limit was reached. For new organizations this limit rises over the first weeks after the first send.Wait and send later. Upgrading doesn't lift it.
plan_daily_capThe plan's daily recipient limit for the organization was reached.Send tomorrow. Upgrading lifts it, but payments aren't open during the beta.
org_pending_reviewThe organization is under operator review.Wait until review is done.
org_review_rejectedSign-up wasn't approved.Contact support.
org_owner_pausedEmergency stop is on for the whole organization.The owner resumes it.
org_abuse_freezeOperators froze sending for the organization.Contact support.
org_billing_blockedSending is blocked by a billing problem.The owner checks Settings › Plan.
agent_not_activeThe agent is stopped or not active.The owner checks.
from_forgeryfrom isn't this agent's address.Use the agent's own address.
evaluation_errorThe send couldn't be evaluated, so it was blocked to be safe.Try again later with a new idempotency key. If it keeps happening, contact support.

All reason codes

These are the codes the public API currently returns in decision.reasons and in audit reasons. Older audit records may show earlier names. Allowed sends carry reasons too. "Old mode" means an old outbound mode (Approval required, Replies only) that Atmark operators set. See Approvals.

Denied

CodeMeaning
org_pending_reviewThe organization is under operator review.
org_review_rejectedSign-up wasn't approved.
org_owner_pausedEmergency stop is on for the whole organization.
org_abuse_freezeOperators froze sending for the organization.
org_billing_blockedSending is blocked by a billing problem.
agent_not_activeThe agent is stopped or not active.
outbound_disabledThe outbound mode is Block all.
from_forgeryfrom isn't this agent's address.
recipient_is_selfThe agent tried to email its own address.
suppression_listThe address has a history of bounces or spam reports.
recipient_blocklistedA recipient is on the outbound blocklist.
recipient_not_allowlistedA recipient isn't on the outbound allowlist.
rate_limit_per_minute · rate_limit_per_hour · rate_limit_per_dayThe agent's per-minute, hourly, or daily sending limit was reached.
recipients_per_messageToo many recipients for the agent's policy limit.
plan_recipients_per_messageToo many recipients for the plan's limit.
recipient_ceiling_exceededToo many recipients for the hard cap no plan can exceed.
daily_send_limitThe organization's daily sending limit was reached. For new organizations it rises over the first weeks after the first send.
plan_daily_capThe plan's daily recipient limit for the organization was reached.
budget_exhaustedThe agent's sending budget was used up. Contact support.
evaluation_errorThe send couldn't be evaluated, so it was blocked to be safe.
release_window_expiredIt was approved but couldn't be sent within the allowed time, so it was closed (old mode).
reply_only_no_inbound_threadIt tried to send outside a received thread (old mode "Replies only").
reply_only_inbound_quarantinedThe received email being replied to is quarantined (old mode "Replies only").

Allowed

CodeMeaning
allowlist_matchEvery recipient is on the outbound allowlist.
unrestricted_modeThe outbound mode is All.
not_blocklistedIn Blocklist mode, no recipient is on the blocklist.
approval_grantedA person approved it.
standing_approvalA recipient (or domain) approved before (old mode).
seed_relationshipA recipient the owner listed when creating the agent (old mode).
reply_within_thread · auto_approve_reply_within_threadAllowed as a reply within the same thread (old mode).
auto_approve_verification_senderAllowed as a reply to a verification-mail sender (old mode).
auto_approve_domainA domain the owner allowed automatically (old mode).

Awaiting approval

CodeMeaning
new_recipientA first-time recipient needs a person's approval (old mode "Approval required").
bootstrap_graceMarks a decision made during the starting period of the old mode "Replies only".

Feedback on this page? Write to support@atmark.ai.