---
title: Account Rules
---

[Skip to content](#%5Ftop) 

[API Reference](https://developers.cloudflare.com/api/go)

[Email Routing](https://developers.cloudflare.com/api/go/resources/email%5Frouting)

Copy Markdown

Open in **Claude**

Open in **ChatGPT**

Open in **Cursor**

---

**Copy Markdown**

**View as Markdown**

# Account Rules

##### [List account or zone routing rules](https://developers.cloudflare.com/api/go/resources/email%5Frouting/subresources/account%5Frules/methods/list)

client.EmailRouting.AccountRules.List(ctx, params) (\*V4PagePaginationArray\[[AccountRule](https://developers.cloudflare.com/api/go/resources/email%5Frouting#%28resource%29%20email%5Frouting.account%5Frules%20%3E%20%28model%29%20account%5Frule%20%3E%20%28schema%29)\], error)

GET/{accounts\_or\_zones}/{account\_or\_zone\_id}/email/routing/rules

##### ModelsExpand Collapse 

type AccountRule struct{…}

ID stringOptional

Routing rule identifier.

maxLength32

Actions \[\][Action](https://developers.cloudflare.com/api/go/resources/email%5Frouting#%28resource%29%20email%5Frouting.rules%20%3E%20%28model%29%20action%20%3E%20%28schema%29)Optional

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 \[\][Matcher](https://developers.cloudflare.com/api/go/resources/email%5Frouting#%28resource%29%20email%5Frouting.rules%20%3E%20%28model%29%20matcher%20%3E%20%28schema%29)Optional

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