Skip to content
Start here

Account Rules

List account or zone routing rules
email_routing.account_rules.list(AccountRuleListParams**kwargs) -> SyncV4PagePaginationArray[AccountRule]
GET/{accounts_or_zones}/{account_or_zone_id}/email/routing/rules
ModelsExpand Collapse
class AccountRule:
id: Optional[str]

Routing rule identifier.

maxLength32
actions: Optional[List[Action]]

List actions patterns.

type: Literal["drop", "forward", "worker"]

Type of supported action.

One of the following:
"drop"
"forward"
"worker"
value: Optional[List[str]]
enabled: Optional[Literal[true, false]]

Routing rule status.

One of the following:
true
false
matchers: Optional[List[Matcher]]

Matching patterns to forward to your actions.

type: Literal["all", "literal"]

Type of matcher.

One of the following:
"all"
"literal"
field: Optional[Literal["to"]]

Field for type matcher.

value: Optional[str]

Value for matcher.

maxLength90
name: Optional[str]

Routing rule name.

maxLength256
priority: Optional[float]

Priority of the routing rule.

minimum0
source: Optional[Literal["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: Optional[str]

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

maxLength32
zone: Optional[Zone]

Zone information for the routing rule.

name: Optional[str]

Zone name.

tag: Optional[str]

Zone tag.

maxLength32