policy

Add correspondent policy rule

Add one allow/block rule for a direction of a scope's policy. Inbox-scoped keys are rejected. A pod-scoped key may mutate its own pod or an inbox in that pod, never account-wide policy. Pod keys cannot add allows on a parent allowlist (blocks are fine).

post/v1/policy/rules

Request

  • Base URL: https://api.openmail.sh
  • URL: https://api.openmail.sh/v1/policy/rules
  • Auth: HTTP bearer

Query parameters

podIdstring

Confine the operation to one pod's policy. Accepts the pod ID. Mutually exclusive with inboxId.

inboxIdstring

Confine the operation to one inbox's policy. Mutually exclusive with podId.

Request body

type'allow' | 'block' required
valuestring required

An email address (user@example.com), a whole domain (example.com), or a domain and all its subdomains (*.example.com, which also covers example.com itself).

direction'inbound' | 'outbound'

inbound governs who may send to the inbox; outbound governs who the inbox may send to (enforced across To, Cc, Bcc, and Reply-To on every send path).

Response

Rule created

object required

Rule created

Changes

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