Skip to content
Start here

Email Routing

Get Email Routing settings
client.emailRouting.get(EmailRoutingGetParams { zone_id } params, RequestOptionsoptions?): Settings { id, enabled, name, 5 more }
GET/zones/{zone_id}/email/routing
Disable Email Routing
Deprecated
client.emailRouting.disable(EmailRoutingDisableParams { zone_id, body } params, RequestOptionsoptions?): Settings { id, enabled, name, 5 more }
POST/zones/{zone_id}/email/routing/disable
Enable Email Routing
Deprecated
client.emailRouting.enable(EmailRoutingEnableParams { zone_id, body } params, RequestOptionsoptions?): Settings { id, enabled, name, 5 more }
POST/zones/{zone_id}/email/routing/enable
ModelsExpand Collapse
Settings { id, enabled, name, 5 more }
id: string

Email Routing settings identifier.

maxLength32
enabled: true | false

State of the zone settings for Email Routing.

One of the following:
true
false
name: string

Domain of your zone.

created?: string

The date and time the settings have been created.

formatdate-time
modified?: string

The date and time the settings have been modified.

formatdate-time
skip_wizard?: true | false

Flag to check if the user skipped the configuration wizard.

One of the following:
true
false
status?: "ready" | "unconfigured" | "misconfigured" | 2 more

Show the state of your account, and the type or configuration error.

One of the following:
"ready"
"unconfigured"
"misconfigured"
"misconfigured/locked"
"unlocked"
Deprecatedtag?: string

Email Routing settings tag. (Deprecated, replaced by Email Routing settings identifier)

maxLength32

Email RoutingDNS

Email Routing - DNS settings
client.emailRouting.dns.get(DNSGetParams { zone_id, subdomain } params, RequestOptionsoptions?): DNSGetResponse
GET/zones/{zone_id}/email/routing/dns
Enable Email Routing
client.emailRouting.dns.create(DNSCreateParams { zone_id, name } params, RequestOptionsoptions?): Settings { id, enabled, name, 5 more }
POST/zones/{zone_id}/email/routing/dns
Unlock Email Routing
client.emailRouting.dns.edit(DNSEditParams { zone_id, name } params, RequestOptionsoptions?): Settings { id, enabled, name, 5 more }
PATCH/zones/{zone_id}/email/routing/dns
Disable Email Routing
client.emailRouting.dns.delete(DNSDeleteParams { zone_id } params, RequestOptionsoptions?): SinglePage<DNSRecord { content, name, priority, 2 more } >
DELETE/zones/{zone_id}/email/routing/dns
ModelsExpand Collapse
DNSRecord { content, name, priority, 2 more }

List of records needed to enable an Email Routing zone.

content?: string

DNS record content.

name?: string

DNS record name (or @ for the zone apex).

maxLength255
priority?: number

Required for MX, SRV and URI records. Unused by other record types. Records with lower priorities are preferred.

maximum65535
minimum0
ttl?: number | 1

Time to live, in seconds, of the DNS record. Must be between 60 and 86400, or 1 for 'automatic'.

One of the following:
number
1
type?: "A" | "AAAA" | "CNAME" | 15 more

DNS record type.

One of the following:
"A"
"AAAA"
"CNAME"
"HTTPS"
"TXT"
"SRV"
"LOC"
"MX"
"NS"
"CERT"
"DNSKEY"
"DS"
"NAPTR"
"SMIMEA"
"SSHFP"
"SVCB"
"TLSA"
"URI"
DNSGetResponse = EmailEmailRoutingDNSQueryResponse { errors, messages, success, 2 more } | EmailDNSSettingsResponseCollection { errors, messages, success, 2 more }
One of the following:
EmailEmailRoutingDNSQueryResponse { errors, messages, success, 2 more }
errors: Array<Error>
code: number
minimum1000
message: string
documentation_url?: string
source?: Source { pointer }
pointer?: string
messages: Array<Message>
code: number
minimum1000
message: string
documentation_url?: string
source?: Source { pointer }
pointer?: string
success: true

Whether the API call was successful.

result?: Result { errors, record }
errors?: Array<Error>
code?: string
missing?: DNSRecord { content, name, priority, 2 more }

List of records needed to enable an Email Routing zone.

record?: Array<DNSRecord { content, name, priority, 2 more } >
content?: string

DNS record content.

name?: string

DNS record name (or @ for the zone apex).

maxLength255
priority?: number

Required for MX, SRV and URI records. Unused by other record types. Records with lower priorities are preferred.

maximum65535
minimum0
ttl?: number | 1

Time to live, in seconds, of the DNS record. Must be between 60 and 86400, or 1 for 'automatic'.

One of the following:
number
1
type?: "A" | "AAAA" | "CNAME" | 15 more

DNS record type.

One of the following:
"A"
"AAAA"
"CNAME"
"HTTPS"
"TXT"
"SRV"
"LOC"
"MX"
"NS"
"CERT"
"DNSKEY"
"DS"
"NAPTR"
"SMIMEA"
"SSHFP"
"SVCB"
"TLSA"
"URI"
result_info?: ResultInfo { count, page, per_page, 2 more }
count?: number

Total number of results for the requested service.

page?: number

Current page within paginated list of results.

per_page?: number

Number of results per page of results.

total_count?: number

Total results available without any search parameters.

total_pages?: number

The number of total pages in the entire result set.

EmailDNSSettingsResponseCollection { errors, messages, success, 2 more }
errors: Array<Error>
code: number
minimum1000
message: string
documentation_url?: string
source?: Source { pointer }
pointer?: string
messages: Array<Message>
code: number
minimum1000
message: string
documentation_url?: string
source?: Source { pointer }
pointer?: string
success: true

Whether the API call was successful.

result?: Array<DNSRecord { content, name, priority, 2 more } >
content?: string

DNS record content.

name?: string

DNS record name (or @ for the zone apex).

maxLength255
priority?: number

Required for MX, SRV and URI records. Unused by other record types. Records with lower priorities are preferred.

maximum65535
minimum0
ttl?: number | 1

Time to live, in seconds, of the DNS record. Must be between 60 and 86400, or 1 for 'automatic'.

One of the following:
number
1
type?: "A" | "AAAA" | "CNAME" | 15 more

DNS record type.

One of the following:
"A"
"AAAA"
"CNAME"
"HTTPS"
"TXT"
"SRV"
"LOC"
"MX"
"NS"
"CERT"
"DNSKEY"
"DS"
"NAPTR"
"SMIMEA"
"SSHFP"
"SVCB"
"TLSA"
"URI"
result_info?: ResultInfo { count, page, per_page, 2 more }
count?: number

Total number of results for the requested service.

page?: number

Current page within paginated list of results.

per_page?: number

Number of results per page of results.

total_count?: number

Total results available without any search parameters.

total_pages?: number

The number of total pages in the entire result set.

Email RoutingRules

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

Email RoutingRulesCatch 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

Email RoutingAddresses

List destination addresses
client.emailRouting.addresses.list(AddressListParams { account_id, direction, page, 2 more } params, RequestOptionsoptions?): V4PagePaginationArray<Address { id, created, email, 3 more } >
GET/accounts/{account_id}/email/routing/addresses
Get a destination address
client.emailRouting.addresses.get(stringdestinationAddressIdentifier, AddressGetParams { account_id } params, RequestOptionsoptions?): Address { id, created, email, 3 more }
GET/accounts/{account_id}/email/routing/addresses/{destination_address_identifier}
Create a destination address
client.emailRouting.addresses.create(AddressCreateParams { account_id, email } params, RequestOptionsoptions?): Address { id, created, email, 3 more }
POST/accounts/{account_id}/email/routing/addresses
Delete destination address
client.emailRouting.addresses.delete(stringdestinationAddressIdentifier, AddressDeleteParams { account_id } params, RequestOptionsoptions?): Address { id, created, email, 3 more }
DELETE/accounts/{account_id}/email/routing/addresses/{destination_address_identifier}
ModelsExpand Collapse
Address { id, created, email, 3 more }
id?: string

Destination address identifier.

maxLength32
created?: string

The date and time the destination address has been created.

formatdate-time
email?: string

The contact email address of the user.

maxLength90
modified?: string

The date and time the destination address was last modified.

formatdate-time
Deprecatedtag?: string

Destination address tag. (Deprecated, replaced by destination address identifier)

maxLength32
verified?: string

The date and time the destination address has been verified. Null means not verified yet.

formatdate-time