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