Skip to content
Start here

Account Rules

List account or zone routing rules
client.EmailRouting.AccountRules.List(ctx, params) (*V4PagePaginationArray[AccountRule], error)
GET/{accounts_or_zones}/{account_or_zone_id}/email/routing/rules
ModelsExpand Collapse
type AccountRule struct{…}
ID stringOptional

Routing rule identifier.

maxLength32
Actions []ActionOptional

List actions patterns.

Type ActionType

Type of supported action.

One of the following:
const ActionTypeDrop ActionType = "drop"
const ActionTypeForward ActionType = "forward"
const ActionTypeWorker ActionType = "worker"
Value []stringOptional
Enabled AccountRuleEnabledOptional

Routing rule status.

One of the following:
const AccountRuleEnabledTrue AccountRuleEnabled = true
const AccountRuleEnabledFalse AccountRuleEnabled = false
Matchers []MatcherOptional

Matching patterns to forward to your actions.

Type MatcherType

Type of matcher.

One of the following:
const MatcherTypeAll MatcherType = "all"
const MatcherTypeLiteral MatcherType = "literal"
Field MatcherFieldOptional

Field for type matcher.

Value stringOptional

Value for matcher.

maxLength90
Name stringOptional

Routing rule name.

maxLength256
Priority float64Optional

Priority of the routing rule.

minimum0
Source AccountRuleSourceOptional

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:
const AccountRuleSourceAPI AccountRuleSource = "api"
const AccountRuleSourceWrangler AccountRuleSource = "wrangler"
DeprecatedTag stringOptional

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

maxLength32
Zone AccountRuleZoneOptional

Zone information for the routing rule.

Name stringOptional

Zone name.

Tag stringOptional

Zone tag.

maxLength32