---
search:
  tags:
    - Inboxes
    - PATCH
seo:
  description: >-
    BillionSend extension: any subset of the rules, merged over the stored…
    Reference for the PATCH /inboxes/{inbox_id}/safety endpoint in the
    BillionSend API.
sidebar:
  label: Update safety rules
  badge: PATCH
title: Update safety rules
type: openapi-operation
---
BillionSend extension: any subset of the rules, merged over the stored ones. Needs the owner, admin or developer role, or a full access team key; inbox-scoped keys and MCP can't change them.

`PATCH /inboxes/{inbox_id}/safety`

**Request body** (`application/json`)

- `accept_from` (string) — Who may write in: anyone; verified (DMARC-aligned senders, known threads, the allowlist); allowlist only. Mail that fails is quarantined.
- `allowlist` (string[]) — "local@domain" (exact) or "\*@domain" (the domain and its subdomains). On the shared domain it only lets mail in
- `owner_addresses` (string[]) — Owners besides the team members' login addresses; ignored on the shared domain
- `screening` (boolean) — Score external mail for prompt injection (agent inboxes only)
- `extract_codes` (boolean) — Expose extracted codes and sign-in links
- `send_policy` (string) — What the inbox may send without a person's approval. On the shared domain "allowlist" answers 422, and so does "open" unless the team is on a paid plan and past its first sends
- `require_approval` (boolean) — Every send waits for a person
- `private_codes` (boolean) — Received codes and sign-in links can't be sent on to anyone but owners
- `send_cap` (integer | null) — Unattended recipients per UTC day; null: no cap. 1-50 on the shared domain
- `forward_to` (string[]) — Forward every delivered message to these team member or owner addresses; team members only on the shared domain

Request body example:

```json
{
  "accept_from": "anyone",
  "allowlist": [
    "string"
  ],
  "owner_addresses": [
    "string"
  ],
  "screening": true,
  "extract_codes": true,
  "send_policy": "reply_only",
  "require_approval": true,
  "private_codes": true,
  "send_cap": 0,
  "forward_to": [
    "string"
  ]
}
```

**Responses**

- `200` — Safety rules
- `401` — Missing, malformed, unknown or revoked API key
- `403` — Restricted API key or role
- `404` — Not found
- `422` — Validation error
- `429` — Over the rate limit (rate\_limit\_exceeded, with Retry-After)

Response example, 200:

```json
{
  "object": "inbox_safety",
  "inbox_id": "5127f22b-d152-46dd-aeaa-3a852d9fbfc2",
  "accept_from": "anyone",
  "allowlist": [
    "string"
  ],
  "owner_addresses": [
    "string"
  ],
  "screening": true,
  "extract_codes": true,
  "send_policy": "reply_only",
  "require_approval": true,
  "private_codes": true,
  "send_cap": 0,
  "forward_to": [
    "string"
  ]
}
```
