Documentation
Sign inGet started

Add a receive rule

POST
/v1/email/mailboxes/{mailbox_id}/receive-rules
curl -X POST "https://us1.platform.bird.com/v1/email/mailboxes/{mailbox_id}/receive-rules" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "block",
    "entry": "spammy.example.com"
  }'
Adds an allow or block rule to the mailbox. Rules match the message's envelope sender; domain entries also match subdomains. Block rules always win — over allow rules and over the reply admission on allowlist mailboxes. An entry can be allow or block, never both: to flip it, delete the rule and re-create it. A mailbox holds up to 200 rules.
Anfrage-Nutzlast
action
string
erforderlich
What the rule does when it matches. Block rules always win. To flip an entry's action, delete the existing rule and re-create it.
entry
string
erforderlich
The sender address (alice@example.com) or domain (example.com) to match. Domains also match their subdomains. Stored lowercase.
note
string
Your own note about why the rule exists.
Antwort-Payload
id
string
erforderlich
Receive rule ID.
mailbox_id
string
erforderlich
The mailbox the rule applies to.
action
string
erforderlich
What the rule does when it matches. Block rules always win — over allow rules and over the reply admission on allowlist mailboxes.
entry
string
erforderlich
The sender address or domain the rule matches. Domains also match their subdomains.
entry_type
string
erforderlich
Whether the entry is a full address or a domain.
note
nullable string
erforderlich
Your own note about why the rule exists. Null when unset.
created_at
string
erforderlich
When the rule was created.