Skip to content
Start here

Email Routing

Get Email Routing settings
email_routing.get(EmailRoutingGetParams**kwargs) -> Settings
GET/zones/{zone_id}/email/routing
Disable Email Routing
Deprecated
email_routing.disable(EmailRoutingDisableParams**kwargs) -> Settings
POST/zones/{zone_id}/email/routing/disable
Enable Email Routing
Deprecated
email_routing.enable(EmailRoutingEnableParams**kwargs) -> Settings
POST/zones/{zone_id}/email/routing/enable
ModelsExpand Collapse
class Settings:
id: str

Email Routing settings identifier.

maxLength32
enabled: Literal[true, false]

State of the zone settings for Email Routing.

One of the following:
true
false
name: str

Domain of your zone.

created: Optional[datetime]

The date and time the settings have been created.

formatdate-time
modified: Optional[datetime]

The date and time the settings have been modified.

formatdate-time
skip_wizard: Optional[Literal[true, false]]

Flag to check if the user skipped the configuration wizard.

One of the following:
true
false
status: Optional[Literal["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: Optional[str]

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

maxLength32

Email RoutingDNS

Email Routing - DNS settings
email_routing.dns.get(DNSGetParams**kwargs) -> DNSGetResponse
GET/zones/{zone_id}/email/routing/dns
Enable Email Routing
email_routing.dns.create(DNSCreateParams**kwargs) -> Settings
POST/zones/{zone_id}/email/routing/dns
Unlock Email Routing
email_routing.dns.edit(DNSEditParams**kwargs) -> Settings
PATCH/zones/{zone_id}/email/routing/dns
Disable Email Routing
email_routing.dns.delete(DNSDeleteParams**kwargs) -> SyncSinglePage[DNSRecord]
DELETE/zones/{zone_id}/email/routing/dns
ModelsExpand Collapse
class DNSRecord:

List of records needed to enable an Email Routing zone.

content: Optional[str]

DNS record content.

name: Optional[str]

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

maxLength255
priority: Optional[float]

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

maximum65535
minimum0
ttl: Optional[Union[float, Literal[1], null]]

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

One of the following:
float
Literal[1]

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

type: Optional[Literal["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"
One of the following:
class EmailEmailRoutingDNSQueryResponse:
errors: List[EmailEmailRoutingDNSQueryResponseError]
code: int
minimum1000
message: str
documentation_url: Optional[str]
source: Optional[EmailEmailRoutingDNSQueryResponseErrorSource]
pointer: Optional[str]
messages: List[EmailEmailRoutingDNSQueryResponseMessage]
code: int
minimum1000
message: str
documentation_url: Optional[str]
source: Optional[EmailEmailRoutingDNSQueryResponseMessageSource]
pointer: Optional[str]
success: Literal[true]

Whether the API call was successful.

result: Optional[EmailEmailRoutingDNSQueryResponseResult]
errors: Optional[List[EmailEmailRoutingDNSQueryResponseResultError]]
code: Optional[str]
missing: Optional[DNSRecord]

List of records needed to enable an Email Routing zone.

record: Optional[List[DNSRecord]]
content: Optional[str]

DNS record content.

name: Optional[str]

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

maxLength255
priority: Optional[float]

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

maximum65535
minimum0
ttl: Optional[Union[float, Literal[1], null]]

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

One of the following:
float
Literal[1]

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

type: Optional[Literal["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: Optional[EmailEmailRoutingDNSQueryResponseResultInfo]
count: Optional[float]

Total number of results for the requested service.

page: Optional[float]

Current page within paginated list of results.

per_page: Optional[float]

Number of results per page of results.

total_count: Optional[float]

Total results available without any search parameters.

total_pages: Optional[float]

The number of total pages in the entire result set.

class EmailDNSSettingsResponseCollection:
errors: List[EmailDNSSettingsResponseCollectionError]
code: int
minimum1000
message: str
documentation_url: Optional[str]
source: Optional[EmailDNSSettingsResponseCollectionErrorSource]
pointer: Optional[str]
messages: List[EmailDNSSettingsResponseCollectionMessage]
code: int
minimum1000
message: str
documentation_url: Optional[str]
source: Optional[EmailDNSSettingsResponseCollectionMessageSource]
pointer: Optional[str]
success: Literal[true]

Whether the API call was successful.

result: Optional[List[DNSRecord]]
content: Optional[str]

DNS record content.

name: Optional[str]

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

maxLength255
priority: Optional[float]

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

maximum65535
minimum0
ttl: Optional[Union[float, Literal[1], null]]

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

One of the following:
float
Literal[1]

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

type: Optional[Literal["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: Optional[EmailDNSSettingsResponseCollectionResultInfo]
count: Optional[float]

Total number of results for the requested service.

page: Optional[float]

Current page within paginated list of results.

per_page: Optional[float]

Number of results per page of results.

total_count: Optional[float]

Total results available without any search parameters.

total_pages: Optional[float]

The number of total pages in the entire result set.

Email RoutingRules

List routing rules
email_routing.rules.list(RuleListParams**kwargs) -> SyncV4PagePaginationArray[EmailRoutingRule]
GET/zones/{zone_id}/email/routing/rules
Get routing rule
email_routing.rules.get(strrule_identifier, RuleGetParams**kwargs) -> EmailRoutingRule
GET/zones/{zone_id}/email/routing/rules/{rule_identifier}
Create routing rule
email_routing.rules.create(RuleCreateParams**kwargs) -> EmailRoutingRule
POST/zones/{zone_id}/email/routing/rules
Update routing rule
email_routing.rules.update(strrule_identifier, RuleUpdateParams**kwargs) -> EmailRoutingRule
PUT/zones/{zone_id}/email/routing/rules/{rule_identifier}
Delete routing rule
email_routing.rules.delete(strrule_identifier, RuleDeleteParams**kwargs) -> EmailRoutingRule
DELETE/zones/{zone_id}/email/routing/rules/{rule_identifier}
ModelsExpand Collapse
class Action:

Actions pattern.

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

Type of supported action.

One of the following:
"drop"
"forward"
"worker"
value: Optional[List[str]]
class EmailRoutingRule:
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
Deprecatedtag: Optional[str]

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

maxLength32
class Matcher:

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

Email RoutingRulesCatch Alls

Get catch-all rule
email_routing.rules.catch_alls.get(CatchAllGetParams**kwargs) -> CatchAllGetResponse
GET/zones/{zone_id}/email/routing/rules/catch_all
Update catch-all rule
email_routing.rules.catch_alls.update(CatchAllUpdateParams**kwargs) -> CatchAllUpdateResponse
PUT/zones/{zone_id}/email/routing/rules/catch_all
ModelsExpand Collapse
class CatchAllAction:

Action for the catch-all routing rule.

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

Type of action for catch-all rule.

One of the following:
"drop"
"forward"
"worker"
value: Optional[List[str]]
class CatchAllMatcher:

Matcher for catch-all routing rule.

type: Literal["all"]

Type of matcher. Default is 'all'.

class CatchAllGetResponse:
id: Optional[str]

Routing rule identifier.

maxLength32
actions: Optional[List[CatchAllAction]]

List actions for the catch-all routing rule.

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

Type of action for catch-all rule.

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[CatchAllMatcher]]

List of matchers for the catch-all routing rule.

type: Literal["all"]

Type of matcher. Default is 'all'.

name: Optional[str]

Routing rule name.

maxLength256
Deprecatedtag: Optional[str]

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

maxLength32
class CatchAllUpdateResponse:
id: Optional[str]

Routing rule identifier.

maxLength32
actions: Optional[List[CatchAllAction]]

List actions for the catch-all routing rule.

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

Type of action for catch-all rule.

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[CatchAllMatcher]]

List of matchers for the catch-all routing rule.

type: Literal["all"]

Type of matcher. Default is 'all'.

name: Optional[str]

Routing rule name.

maxLength256
Deprecatedtag: Optional[str]

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

maxLength32

Email RoutingAddresses

List destination addresses
email_routing.addresses.list(AddressListParams**kwargs) -> SyncV4PagePaginationArray[Address]
GET/accounts/{account_id}/email/routing/addresses
Get a destination address
email_routing.addresses.get(strdestination_address_identifier, AddressGetParams**kwargs) -> Address
GET/accounts/{account_id}/email/routing/addresses/{destination_address_identifier}
Create a destination address
email_routing.addresses.create(AddressCreateParams**kwargs) -> Address
POST/accounts/{account_id}/email/routing/addresses
Delete destination address
email_routing.addresses.delete(strdestination_address_identifier, AddressDeleteParams**kwargs) -> Address
DELETE/accounts/{account_id}/email/routing/addresses/{destination_address_identifier}
ModelsExpand Collapse
class Address:
id: Optional[str]

Destination address identifier.

maxLength32
created: Optional[datetime]

The date and time the destination address has been created.

formatdate-time
email: Optional[str]

The contact email address of the user.

maxLength90
modified: Optional[datetime]

The date and time the destination address was last modified.

formatdate-time
Deprecatedtag: Optional[str]

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

maxLength32
verified: Optional[datetime]

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

formatdate-time