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.
Cuerpo de la solicitud
action
string
obligatorio
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
obligatorio
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.
Carga de respuesta
id
string
obligatorio
Receive rule ID.
mailbox_id
string
obligatorio
The mailbox the rule applies to.
action
string
obligatorio
What the rule does when it matches. Block rules always win — over allow rules and over the reply admission on allowlist mailboxes.
entry
string
obligatorio
The sender address or domain the rule matches. Domains also match their subdomains.
entry_type
string
obligatorio
Whether the entry is a full address or a domain.
note
nullable string
obligatorio
Your own note about why the rule exists. Null when unset.
created_at
string
obligatorio
When the rule was created.