Send Authorization
Your agent calls one endpoint to send mail. Behind it, mailbot runs an ordered
chain of checks and stops at the first one that says no. When it stops, you get
an HTTP status and a machine readable error.code. A successful scheduled request
records pending work; it does not mean the message has reached the transport.
Delivery checks run again when that work is due.
The checks below describe the request and delivery boundaries. Their exact order depends on the route: ingress, authentication and abuse controls may reject before body validation. The full code table lives in Errors.
The chain
Applies to POST /v1/inboxes/:inboxId/messages, the reply route,
and the global send route.
| Step | What is checked | Status and code when it stops |
|---|---|---|
| 1 | Request shape and outbound attachment policy, before any message or reservation | 400 VALIDATION_ERROR; nonempty attachments: 403 OUTBOUND_POLICY_DENIED, reason attachment_review_required; HTTP body ceiling: 413 |
| 2 | API key is live and allowed to write to this inbox | 401 UNAUTHORIZED, 403 INSUFFICIENT_PERMISSION, 403 SCOPED_API_KEY_FORBIDDEN |
| 3 | Account is not locked by abuse controls | 403 ACTION_UNAVAILABLE |
| 4 | Account ownership is verified | 403 OWNERSHIP_VERIFICATION_REQUIRED |
| 5 | Request rate for the key | 429 RATE_LIMIT_EXCEEDED, 503 RATE_LIMIT_UNAVAILABLE |
| 6 | Abuse gates for new, untrusted and shared domain senders | 429 NEW_ACCOUNT_RATE_LIMIT, 429 SHARED_DOMAIN_NEW_ACCOUNT_RATE_LIMIT, 429 SHARED_DOMAIN_UNTRUSTED_RATE_LIMIT, 429 SANDBOX_BURST_LIMIT_EXCEEDED, 429 SPRAY_PATTERN_DETECTED, 503 OUTBOUND_SHARED_DOMAIN_PAUSED, 503 OUTBOUND_UNTRUSTED_ACCOUNTS_PAUSED |
| 7 | Inbox reputation and account standing | 403 INBOX_DISABLED_BOUNCE_RATE, 403 INBOX_DISABLED_COMPLAINT_RATE, 403 ACCOUNT_ABUSE_SUSPENDED |
| 8 | Content screening | 403 SUSPICIOUS_CONTENT |
| 9 | Inbox is active | 400 INBOX_INACTIVE |
| 10 | Per inbox daily send count | 429 DAILY_SEND_LIMIT_EXCEEDED |
| 11 | Per account daily and monthly send counts | 429 DAILY_SEND_LIMIT_REACHED, 429 MONTHLY_EMAIL_LIMIT_REACHED |
| 12 | Outbound attachments must be omitted or []; inbound plan limits are separate | Nonempty arrays have already been denied before this point |
| 13 | send_at is a future timestamp | 400 INVALID_SEND_AT |
| 14 | Sender domain is verified for this account | 400 DOMAIN_NOT_VERIFIED |
| 15 | Credit balance, when credit mode is enabled for the account | 402 INSUFFICIENT_CREDITS |
| 16 | SPF, DKIM and DMARC on the sending domain | 422 COMPLIANCE_FAILED |
| 17 | Delivery policy, the last gate before the transport | 403 with one of the delivery policy codes below, or 503 delivery_unavailable |
| 18 | Handoff to the transport | 502 TRANSMISSION_FAILED |
A scheduled send runs the delivery policy twice: once when you create it, so a send that can never be authorized is refused immediately instead of failing silently at its send time, and again when the worker picks it up.
Delivery policy codes
Step 17 is the gate that decides whether this account may put this mail in front
of these recipients right now. It returns 403 and the code below. The HTTP
message is deliberately generic; the code is the part to branch on.
| Code | Meaning | What to do |
|---|---|---|
ownership_unverified | The account has never proved it owns its own email address | Sign in at getmail.bot with the email code or an OAuth provider, then retry |
recipient_unproven | The recipient is neither the verified owner nor covered by reviewed recipient approval or account trust | Mail your own account address while you build, and ask for review before mailing third parties |
untrusted_paused | Sending by untrusted accounts is paused by the operator | Wait for the pause to lift; nothing was charged or queued |
shared_domain_paused | Sending from the shared mail domain is paused by the operator | Send from your own verified domain, or wait for the pause to lift |
outbound_paused | All outbound sending is paused by the operator | Wait for the pause to end. Nothing was created, so the same request can go again afterwards |
account_suspended | The account is suspended by abuse controls | Contact support; sending stays closed until the suspension is lifted |
attachment_review_required | Outbound attachments are unavailable; internal transport also rejects old queued attachments | Omit attachments or use []; link to files you host. Public nonempty arrays return OUTBOUND_POLICY_DENIED with this reason before message creation |
recipient_invalid | A recipient address is not a valid address | Fix the address and retry |
recipient_cap_exceeded | Zero recipients, or more than 10 across to, cc and bcc | Split the send into batches of at most 10 recipients |
credit_mode_single_recipient_only | In credit mode a send carries exactly one recipient | Send one message per recipient |
recipient_suppressed | A recipient is suppressed for this account or platform wide | Drop the recipient; a suppression records a bounce or a complaint |
recipient_quota_exhausted | The plan's monthly or daily recipient count is spent | Wait for the window to reset or move to a larger plan |
unsafe_header | A newline was found in the subject, the from address or a custom header | Strip control characters before sending |
domain_unverified | The inbox domain has no verified domain record on this account | Add the domain, publish its DNS records, verify it, then retry |
sender_disabled | The inbox is inactive, has no send permission, or its address does not match the from address | Check the inbox with GET /v1/inboxes/:id |
sender_unknown | The from address resolves to no inbox on any account | Send from an inbox address returned by the inboxes API |
sender_account_mismatch | The key's account does not own the inbox | Use a key belonging to the account that owns the inbox |
message_approval_required | The key requires a person to approve each message, and this one has not been approved | Approve it in the dashboard, or wait for the owner to. Do not send it again |
send_authorization_required, send_authorization_revoked | Permission to send is missing or was withdrawn for this key or inbox | Check the key permission and the inbox, then send again |
message_sender_mismatch | The sender on the message does not match its inbox | Send from an address that belongs to the inbox |
billing_review_required | Billing needs a review before more mail can go out | Open Billing in the dashboard |
paid_plan_expired | The paid plan ended | Renew the plan in Billing |
content_blocked | The content check blocked the message | Change the content and send again |
content_too_large | The body is over 1,000,000 characters in total | Shorten it or link to the content |
marketing_single_recipient_required | This kind of message goes to exactly one recipient | Send one message per recipient |
delivery_already_claimed | This exact delivery is already being processed, so it will not go out twice | Read the original message. Do not send another |
delivery_already_reserved | This exact delivery is already reserved, so it will not be sent twice | Treat the original send as authoritative; do not retry with a new id |
verification_invalid | An internal verification mail was shaped wrong | Not reachable from the public API |
system_recipient_denied | An internal sender tried to mail someone other than the account owner | Not reachable from the public API |
system_sender_retired, system_sender_unconfigured, system_sender_invalid_uuid, system_sender_mismatch | An internal sender identity is retired or misconfigured in production | Not reachable from the public API; report it if you see one |
503 delivery_unavailable is different from every code above. It means the gate
itself could not reach a verdict, so the state of your send is unknown rather
than refused. Read the message back with GET /v1/inboxes/:inboxId/messages
before you retry.
What a denial guarantees
When step 17 refuses a send, mailbot removes the provisional message row, returns
any credit it had debited, and writes an outbound.denied entry to the audit log
with the code. It only does that when the refusal is proven to have happened
before the transport. If the message was already submitted or claimed, the row
stays and the reservation stays with it, because that state is uncertain and
deleting it would be a lie.
So a 403 from this gate means nothing left mailbot, nothing was billed, and the
audit log can prove it. That does not make the same request safe to repeat: most of
these denials fail again until you change the recipient, the key or the account. Each
code above says what to change. See Reading a Send Failure. Read it with GET /v1/audit-log.
Related
GET /v1/account exposes data.ownership_verified_at on success. Null storage
returns 403 OWNERSHIP_VERIFICATION_REQUIRED without account data. A timestamp
proves ownership only; null or missing fields never imply permission to send.
- Errors for the complete code reference
- Quick Start for the preconditions of a first send
- Security & Trust for the controls behind these gates