Skip to main content
POST
TypeScript

Authorizations

Authorization
string
header
required

Your Inbound API key. Include it in the Authorization header as: Bearer

Body

name
string
required

A descriptive name for the rule.

Minimum string length: 1
type
enum<string>
required
Available options:
explicit,
ai_prompt
config
Explicit rule configuration · object
required

Configuration matching the selected rule type. See the request examples for complete explicit and AI configurations.

description
string

Optional explanation of what the rule handles.

priority
number
default:0

Evaluation priority. Higher values run first; the first matching rule wins. Defaults to 0.

action
Allow · object

Action to take when the rule matches: allow (also marks the email as not junk), block, junk, or route to an owned endpoint. Defaults to allow when omitted.

Response

The newly created active guard rule.

The newly created active guard rule.

success
boolean
required
data
object
required