policy

Replace a mailbox's mail policy

Validated before write: hard errors (regex won't compile, a contentGuards[].reject over 1024 chars, auditLog.retentionDays < 1, a senders[].match with neither address nor domain, an address/domain of the wrong shape) reject the whole PUT with 400. Unknown capabilities values are warnings only — they pass through and are echoed back in warnings, not rejected. On success the stored version is incremented by 1.

put/v1/mailboxes/{mailbox_id}/policy

Request

  • Base URL: https://mbag.ai/api
  • URL: https://mbag.ai/api/v1/mailboxes/{mailbox_id}/policy
  • Auth: HTTP bearer

Path parameters

mailbox_idinteger required

Request body

blockliststring[]

Recipient addresses/bare domains this mailbox may never send to. Omitted when empty.

defaultAction'bounce' | 'drop' required
mode'live' | 'supervised' | 'shadow' required

Response

The new stored policy, with the bumped version and any non-fatal warnings.

mailbox_idinteger required
versioninteger required
warningsstring[]

Non-fatal validation warnings from PUT (e.g. unknown capability names). Omitted when empty; always empty on GET.

Changes

No recorded changes to this operation across all 1 revision of this API.