Create a shield rule
Shield Rules
Create a shield rule
Allow, block, or reroute matching mail before it is stored.
POST
Create a shield rule
Creates a shield rule. New rules are appended last in the
evaluation order, so adding one can never change what your existing rules do —
move it up with Reorder once you’ve
confirmed it matches what you meant.
string
required
Short label, up to 60 characters. Shown in the console and on every block
record the rule produces.
string
required
One of
allow, block, or route.allow— deliver normally and stop. Put one above a broadblockto carve out an exception.block— permanently drop the message. It is never stored or delivered, and only an envelope record is kept (see List blocks); the body cannot be recovered. It does still count against your monthly allotment — the message was received before any rule could look at it.route— deliver toendpointIdsinstead of the address’s own destinations.
array
required
1–8 conditions. All of them must match (AND). For “either/or”, create two
rules.
array
route only. At most one webhook and one email destination, the same
fan-out limit addresses live under. An empty array quarantines: the
message is stored and readable over the API, and delivered nowhere.string
Limit the rule to one domain (
dom_…). Omit both scope fields to apply it to
every domain on the account.string
Limit the rule to one address route (
addr_…). Mutually exclusive with
domainId.Plans cap how many rules an account may hold (3 on Free, 200 on Scale). Over
the cap, this returns
402.