Skip to content
Start here

Rules

List routing rules
client.emailRouting.rules.list(RuleListParams { zone_id, enabled, page, per_page } params, RequestOptionsoptions?): V4PagePaginationArray<EmailRoutingRule { id, actions, enabled, 4 more } >
GET/zones/{zone_id}/email/routing/rules
Get routing rule
client.emailRouting.rules.get(stringruleIdentifier, RuleGetParams { zone_id } params, RequestOptionsoptions?): EmailRoutingRule { id, actions, enabled, 4 more }
GET/zones/{zone_id}/email/routing/rules/{rule_identifier}
Create routing rule
client.emailRouting.rules.create(RuleCreateParams { zone_id, actions, matchers, 3 more } params, RequestOptionsoptions?): EmailRoutingRule { id, actions, enabled, 4 more }
POST/zones/{zone_id}/email/routing/rules
Update routing rule
client.emailRouting.rules.update(stringruleIdentifier, RuleUpdateParams { zone_id, actions, matchers, 3 more } params, RequestOptionsoptions?): EmailRoutingRule { id, actions, enabled, 4 more }
PUT/zones/{zone_id}/email/routing/rules/{rule_identifier}
Delete routing rule
client.emailRouting.rules.delete(stringruleIdentifier, RuleDeleteParams { zone_id } params, RequestOptionsoptions?): EmailRoutingRule { id, actions, enabled, 4 more }
DELETE/zones/{zone_id}/email/routing/rules/{rule_identifier}
ModelsExpand Collapse
Action { type, value }

Actions pattern.

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

Type of supported action.

One of the following:
"drop"
"forward"
"worker"
value?: Array<string>
EmailRoutingRule { id, actions, enabled, 4 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
Deprecatedtag?: string

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

maxLength32
Matcher { type, field, value }

Matching pattern to forward 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

RulesCatch Alls

Get catch-all rule
client.emailRouting.rules.catchAlls.get(CatchAllGetParams { zone_id } params, RequestOptionsoptions?): CatchAllGetResponse { id, actions, enabled, 3 more }
GET/zones/{zone_id}/email/routing/rules/catch_all
Update catch-all rule
client.emailRouting.rules.catchAlls.update(CatchAllUpdateParams { zone_id, actions, matchers, 2 more } params, RequestOptionsoptions?): CatchAllUpdateResponse { id, actions, enabled, 3 more }
PUT/zones/{zone_id}/email/routing/rules/catch_all
ModelsExpand Collapse
CatchAllAction { type, value }

Action for the catch-all routing rule.

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

Type of action for catch-all rule.

One of the following:
"drop"
"forward"
"worker"
value?: Array<string>
CatchAllMatcher { type }

Matcher for catch-all routing rule.

type: "all"

Type of matcher. Default is 'all'.

CatchAllGetResponse { id, actions, enabled, 3 more }
id?: string

Routing rule identifier.

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

List actions for the catch-all routing rule.

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

Type of action for catch-all rule.

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

Routing rule status.

One of the following:
true
false
matchers?: Array<CatchAllMatcher { type } >

List of matchers for the catch-all routing rule.

type: "all"

Type of matcher. Default is 'all'.

name?: string

Routing rule name.

maxLength256
Deprecatedtag?: string

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

maxLength32
CatchAllUpdateResponse { id, actions, enabled, 3 more }
id?: string

Routing rule identifier.

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

List actions for the catch-all routing rule.

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

Type of action for catch-all rule.

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

Routing rule status.

One of the following:
true
false
matchers?: Array<CatchAllMatcher { type } >

List of matchers for the catch-all routing rule.

type: "all"

Type of matcher. Default is 'all'.

name?: string

Routing rule name.

maxLength256
Deprecatedtag?: string

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

maxLength32