policy_denied

HTTP 403 Don’t retry REST and MCP

A sending rule refused the send. Nothing is wrong with the key or the request.

How to fix it

  1. Read details.reason_codes on the response. It tells a block from an allow-list miss. A daily-limit refusal has none; its message is “The daily recipient limit has been reached.”
  2. Check the inbox’s rules with GET /projects/{project_id}/inboxes/{inbox_id}/policy. Members only; a key gets permission_denied.
  3. If the inbox wants approval, send it again. It waits as a draft until a person approves it.
  4. Don’t retry a daily-limit refusal on a short backoff. The limit resets at midnight UTC.

Which rule fired

Rules run apart from permissions, and again when the message actually leaves. Tightening a rule stops sends that are already waiting. That later check says “Current policy does not authorize this send.” and carries no reason codes.

In details.reason_codesMeans
send_disabled Sending is paused for the workspace, project or inbox
blocked_recipient A recipient is on a block list
recipient_not_allowed A recipient isn’t on the allow list
unsupported_policy_rule A rule this version can’t evaluate; contact support

Example

POST /v1/projects/{project_id}/inboxes/{inbox_id}/messages → 403
{
  "error": {
    "code": "policy_denied",
    "message": "Workspace policy blocked this send.",
    "request_id": "req_8Kd2x91",
    "retryable": false,
    "details": { "reason_codes": ["recipient_not_allowed"] }
  }
}

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

Where it appears

  • POST /projects/{project_id}/inboxes/{inbox_id}/messages
  • POST /projects/{project_id}/approvals/{approval_id}/approve
  • MCP tool: send_message
  • MCP tool: create_draft

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

View as Markdown

Search docs