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 broad block to carve out an exception.
  • blockpermanently 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 to endpointIds instead 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.
A block rule deletes mail. There is no quarantine folder to recover it from and no body to inspect afterwards — only the sender, recipient, and subject in the block log. Test a new rule as route with an empty endpointIds first if you want to see what it catches before it starts destroying anything.
Plans cap how many rules an account may hold (3 on Free, 200 on Scale). Over the cap, this returns 402.