Skip to main content
View as Markdown

Errors

Every failure returns the same envelope. code is stable and meant for your agent to branch on. message is for a human reading a log and may be reworded without notice.

{
"error": {
"code": "DOMAIN_NOT_VERIFIED",
"message": "The sender domain \"example.com\" is not verified for this account"
}
}

Some errors carry extra fields next to code and message. COMPLIANCE_FAILED carries details with the SPF, DKIM and DMARC result. INSUFFICIENT_CREDITS carries balance and required_credits.

Every failure answers five questions: what happened, where it stopped, whether a retry is safe, which request it was and what to do next. Reading a Send Failure explains each answer. The request ID is the x-request-id response header. Quote it when you contact support.

Branch on code, not on the status. One status covers several causes, and the status alone cannot tell you whether to fix the request, wait, or stop.

Status meanings​

StatusMeaning
400The request or the current resource state is wrong
401No usable API key on the request
402Credit balance is spent, in credit mode
403Authenticated, but this is not allowed right now
404No such resource on this account
408A wait call timed out before the awaited message arrived
409Conflicts with something that already exists or already happened
410The endpoint is retired, or ownership must be proved first
413Request body exceeds the HTTP ingress ceiling; inbound attachment limits are separate
422The pre-send compliance check failed
429A request rate or a sending volume limit was hit
500Server fault on our side
502An upstream provider rejected or failed the operation
503A dependency or an operator switch makes the operation unavailable

Authentication and keys​

CodeStatusMeaning
UNAUTHORIZED401Missing key, unknown key, or revoked key
OTP_INVALID401The sign in code does not match
OTP_EXPIRED_OR_NOT_FOUND400The sign in code expired or was already used
OWNERSHIP_VERIFICATION_REQUIRED403The account has not proved it owns its email address. Sign in with the email code or an OAuth provider
EMAIL_VERIFICATION_REQUIRED410Sign in cannot continue until the address is verified
INSUFFICIENT_PERMISSION403The key lacks read or write for this method, or tried to mint a key with permissions it does not hold
SCOPED_API_KEY_FORBIDDEN403The key is scoped to one inbox and this route is outside it
KEY_NOT_ACTIVE400The key is not in an active state
CANNOT_DELETE_ACTIVE_KEY400Revoke the key before deleting it
INVALID_EXPIRES_AT400expires_at is not a usable future timestamp
ACCOUNT_NOT_FOUND400, 404No account for that address
ACCOUNT_EXISTS409An account already uses that address
OAUTH_PROVIDER_NOT_FOUND404, 302Unknown OAuth provider in the path
OAUTH_PROVIDER_NOT_CONFIGURED503That OAuth provider is not configured on this deployment
PASSWORD_RESET_INVALID400The reset link is wrong or already spent
PASSWORD_RESET_RATE_LIMIT429Too many reset requests for that address

Inboxes and domains​

CodeStatusMeaning
INBOX_NOT_FOUND, NOT_FOUND404No such inbox on this account
INBOX_ALREADY_EXISTS409That address already exists
USERNAME_NOT_AVAILABLE409The username is taken on that domain
INBOX_USERNAME_RESERVED409The username is reserved by the platform
INVALID_USERNAME400The username is not a valid local part
INVALID_INBOX_UPDATE400Nothing updatable in the body
INBOX_INACTIVE400The inbox is disabled, so it cannot send
INBOX_LIMIT_REACHED, PLAN_LIMIT_REACHED403The plan's inbox or domain count is spent
SHARED_DOMAIN_INBOX_LIMIT403The per account cap on shared domain inboxes is spent
INVALID_DOMAIN400The domain is not a usable domain name
DOMAIN_EXISTS, DOMAIN_TAKEN409The domain is already registered, here or on another account
DOMAIN_IN_USE409Inboxes still live on the domain
DOMAIN_NOT_VERIFIED400The sender domain has no verified record on this account
CANNOT_DELETE_SANDBOX, CANNOT_CONNECT_SANDBOX400The shared sandbox domain is not yours to delete or connect
CLOUDFLARE_INVALID_TOKEN, CLOUDFLARE_ZONE_NOT_FOUND, ZONE_DOMAIN_MISMATCH, CLOUDFLARE_PROVISION_FAILED400, 409The Cloudflare connect flow could not provision DNS
DOMAIN_REGISTRATION_FAILED500Domain registration failed on our side

Sending​

Read Send Authorization for the order these run in. Codes below are the ones a send can return before anything leaves mailbot.

CodeStatusMeaning
VALIDATION_ERROR400The body does not match the send schema. At most 10 addresses per field, subject up to 998 characters, body_text required
IDEMPOTENCY_KEY_REQUIRED400Missing or malformed Idempotency-Key (8 to 255 characters) on a creating call made with an API key or MCP
IDEMPOTENCY_CONFLICT, IDEMPOTENCY_IN_PROGRESS, IDEMPOTENCY_OUTCOME_UNKNOWN409Key reused with a different payload (use a new key); first attempt still running (wait, then repeat the identical request); first attempt failed with a server error and the key is locked, so read the message back and use a new key only if it did not go out. A repeat of a finished request returns the first response again with no second send
INVALID_SEND_AT400send_at is not an ISO timestamp in the future
OUTBOUND_POLICY_DENIED403Nonempty outbound attachments are unavailable; reason is attachment_review_required. No message, debit, reservation or transport is created
NO_REPLY_TARGET, THREAD_NOT_REPLYABLE400The thread has no message to reply to
FROM_INBOX_NOT_FOUND404The from address matches no inbox you own
MISSING_TARGET_URL400A forward call arrived without a destination
COMPLIANCE_FAILED422SPF, DKIM or DMARC did not pass for the sending domain. details says which
SUSPICIOUS_CONTENT403Content screening flagged the message before send
ATTACHMENT_SIZE_EXCEEDED, SCHEDULED_ATTACHMENTS_UNSUPPORTED400, 403Attachment limit codes. Outbound attachments are refused as a whole, so remove attachments instead of shrinking them
INSUFFICIENT_CREDITS402Credit mode is on and the balance is spent. balance and required_credits are included
TRANSMISSION_FAILED502The email provider did not confirm the handoff. The message is saved as failed and carries message_id. A rejection and a timeout both return this code today, so read the message back before sending again
delivery_unavailable503The delivery policy could not reach a verdict. The state of the send is unknown, so read the message back before retrying
lowercase delivery policy codes403The delivery policy refused the send. See the full table

Omit outbound attachments or use []. Nonempty arrays receive the early policy denial above, including scheduled sends and replies. Non-array values remain 400 VALIDATION_ERROR; authentication, abuse and the body ceiling may reject earlier. Link to files you host. Inbound limits and storage are separate.

Volume and rate​

CodeStatusMeaning
RATE_LIMIT_EXCEEDED429Request rate for the key. Read the X-RateLimit-* headers
RATE_LIMIT_UNAVAILABLE503The rate limiter is unreachable. Sensitive routes such as sign in are refused rather than waved through
DAILY_SEND_LIMIT_EXCEEDED429The inbox's own daily send count is spent
DAILY_SEND_LIMIT_REACHED429The account's daily send count is spent
MONTHLY_EMAIL_LIMIT_REACHED429The plan's monthly outbound count is spent
NEW_ACCOUNT_RATE_LIMIT429A new account is capped at 10 outbound emails per rolling 24 hours for its first 7 days
SHARED_DOMAIN_NEW_ACCOUNT_RATE_LIMIT429A separate rolling 24 hour cap for new accounts sending on the shared domain. The message carries the number in force
SHARED_DOMAIN_UNTRUSTED_RATE_LIMIT429A rolling 24 hour cap for untrusted accounts sending on the shared domain. The message carries the number in force
SANDBOX_BURST_LIMIT_EXCEEDED429Too many sandbox sends in a short burst
SPRAY_PATTERN_DETECTED429The recipient pattern looks like spraying
ACCOUNT_ABUSE_SUSPENDED, ACTION_UNAVAILABLE403Abuse controls suspended the account. Billing stays reachable
INBOX_DISABLED_BOUNCE_RATE403The inbox was disabled because its bounce rate crossed the threshold
INBOX_DISABLED_COMPLAINT_RATE403The inbox was disabled because its complaint rate crossed the threshold
OUTBOUND_SHARED_DOMAIN_PAUSED503Shared domain sending is paused by the operator
OUTBOUND_UNTRUSTED_ACCOUNTS_PAUSED503Untrusted account sending is paused by the operator

Messages, threads and scheduling​

CodeStatusMeaning
NOT_FOUND404No such message or thread on this account
FILE_NOT_FOUND404No such attachment on that message
INVALID_PARAMETER400A query or path parameter is unusable
MESSAGE_NOT_SCHEDULED400, 409The message is not in a scheduled state
SCHEDULE_ALREADY_SENT409The scheduled message already went out, so it cannot be cancelled or moved
SCHEDULE_ENQUEUE_FAILED503The message was saved but the scheduler could not queue it, so it will not go out on time. The error carries message_id. Reschedule that message; do not create a second one
MESSAGE_WAIT_TIMEOUT408No matching message arrived inside the wait window. This is a timeout, not a verdict

Webhooks and events​

CodeStatusMeaning
INVALID_WEBHOOK_URL400The URL is not usable or points at a blocked network
WEBHOOK_REQUIRED400The operation needs a subscribed webhook
WEBHOOK_LIMIT_REACHED403The plan's webhook count is spent
UNSUPPORTED_EVENT400Unknown event type in the request
ALREADY_REPLAYED409That event was already replayed
REPLAY_FAILED502The replay target rejected the delivery
INVALID_UNSUBSCRIBE_TOKEN400The unsubscribe token is wrong or expired

Billing and account​

CodeStatusMeaning
INVALID_BILLING_REQUEST400Unknown plan or interval
PAYPAL_NOT_CONFIGURED, PAYPAL_PLAN_NOT_CONFIGURED503Checkout is not configured for that plan on this deployment
BILLING_SUBSCRIBE_FAILED500Subscription creation failed
WEBHOOK_RELIABILITY_INCLUDED409Reliability is standard on every plan. New trial/subscription requests are rejected without a provider call
ADDON_NOT_SUBSCRIBED400A legacy billing cancellation has no existing subscription to cancel
EMAIL_ALREADY_IN_USE409Another account already uses that address
EMAIL_UNCHANGED400The requested address equals the current one
EMAIL_CHANGE_CODE_INVALID400The address change code is wrong or expired
ACCOUNT_SELF_DELETE_DISABLED403Self service deletion is off on this deployment
INVALID_DELETE_REQUEST400The deletion confirmation does not match
ENDPOINT_DEPRECATED410The endpoint is retired. The message names its replacement

Server and dependencies​

CodeStatusMeaning
INTERNAL_ERROR500Unhandled fault. A read can be repeated. After a send, read the message back before sending again
COMPLIANCE_CHECK_FAILED, READINESS_CHECK_FAILED500The compliance or readiness check could not complete
IMPORTS_NOT_CONFIGURED503Mailbox import is not configured on this deployment
CONNECTION_INACTIVE400The import connection is not active

A 5xx is never a verdict on your request. It says we could not decide. Read the resource back before retrying anything that could send mail twice.