payment_required

HTTP 402 Don’t retry REST and MCP

The workspace is authenticated and permitted to make this call, but the capability it asks for is gated behind an entitlement that is not currently active.

How to fix it

  1. Check GET /billing/entitlement first. It reports what the workspace currently holds and is the only authoritative answer.
  2. For custom domains, subscribe to Builder ($19/mo, 10 domains) or Team ($79/mo, 50 domains) in the console, then attach the domain. An attach without a paid subscription returns payment_required.
  3. If you are at the live inbox limit, a paid plan raises it: Builder includes 10 live inboxes, Team 50. A new workspace does not renew the complimentary allowance, which is per verified owner identity.
  4. Use a test project while you build. Test inboxes are free, capped at 3 per workspace, and never consume email units.

Which rule fired

Entitlement and permission are separate gates and they fail with separate codes. A 403 means the credential is not allowed to do this; a 402 means nothing about the credential is wrong and the workspace simply does not have the capability. The entitlement check reads live state each time: a paid subscription, an operational grant, or the complimentary live allowance. The free allowance is one live inbox and 100 email units a month per verified owner identity, claimed by that identity's first eligible workspace, and creating a second workspace does not mint a second allowance.

In error.messageMeans
Live mail is not available. Sending live mail, or reserving an upload in a live project, with no paid subscription, no operational grant, and no remaining complimentary live entitlement.
A current paid subscription is required to resume sending. Sending live mail, or reserving an upload in a live project, after a subscription has lapsed: the workspace has had billing, and no paid plan or operational grant is current.
A current paid subscription is required. Creating a live inbox after a subscription has lapsed: the workspace has had billing, and no paid plan or operational grant is current. Creating a live inbox on the platform domain while live mail is switched off on this deployment, for a workspace with no paid subscription.
This workspace has reached its live inbox capacity. Creating a live inbox when the workspace already holds as many live inboxes as its limit allows.
Custom domains require a verified paid subscription. Attaching or verifying a custom domain, or creating an inbox on one, without a verified paid subscription.
Live projects require the go-live inbox entitlement or a paid subscription. Creating a live project with neither the go-live inbox entitlement nor a paid subscription.
No billing account is available. Opening a billing portal session when no billing account exists for the workspace, or when its livemode does not match the server's.

Why it works this way: Receiving is not gated by this. When an allowance runs out, sending stops and mail that already arrived stays readable, because deleting or hiding received mail over a billing state would destroy data the customer already has.

Example

POST /v1/projects/{project_id}/domains → 402
{
  "error": {
    "code": "payment_required",
    "message": "Custom domains require a verified paid subscription.",
    "request_id": "req_8Kd2x91",
    "retryable": false,
    "details": {}
  }
}

Over MCP, send_message returns it as text in a result marked isError: true, not as this body.

Where it appears

  • POST /projects
  • POST /projects/{project_id}/inboxes
  • POST /projects/{project_id}/inboxes/{inbox_id}/messages
  • POST /projects/{project_id}/uploads
  • POST /projects/{project_id}/domains
  • POST /projects/{project_id}/domains/{domain_id}/verify
  • POST /billing/portal-sessions

Paths are relative to https://api.emailforagents.ai/v1.

View as Markdown

Search docs