Skip to content
Start here

Account Rules

List account or zone routing rules
client.emailRouting.accountRules.list(AccountRuleListParams { account_id, zone_id, enabled, 2 more } params?, RequestOptionsoptions?): V4PagePaginationArray<AccountRule { id, actions, enabled, 6 more } >
GET/{accounts_or_zones}/{account_or_zone_id}/email/routing/rules
ModelsExpand Collapse
AccountRule { id, actions, enabled, 6 more }
id?: string

Routing rule identifier.

maxLength32
actions?: Array<Action { type, value } >

List actions patterns.

type: "drop" | "forward" | "worker"

Type of supported action.

One of the following:
"drop"
"forward"
"worker"
value?: Array<string>
enabled?: true | false

Routing rule status.

One of the following:
true
false
matchers?: Array<Matcher { type, field, value } >

Matching patterns to forward to your actions.

type: "all" | "literal"

Type of matcher.

One of the following:
"all"
"literal"
field?: "to"

Field for type matcher.

value?: string

Value for matcher.

maxLength90
name?: string

Routing rule name.

maxLength256
priority?: number

Priority of the routing rule.

minimum0
source?: "api" | "wrangler"

Who manages the rule. api covers dashboard, generic API, and Terraform; wrangler means the rule is managed by a Worker’s wrangler.jsonc. Defaults to api when omitted on write.

One of the following:
"api"
"wrangler"
Deprecatedtag?: string

Routing rule tag. (Deprecated, replaced by routing rule identifier)

maxLength32
zone?: Zone { name, tag }

Zone information for the routing rule.

name?: string

Zone name.

tag?: string

Zone tag.

maxLength32