Skip to content
Start here

Email Routing

Get Email Routing settings
client.EmailRouting.Get(ctx, query) (*Settings, error)
GET/zones/{zone_id}/email/routing
Disable Email Routing
Deprecated
client.EmailRouting.Disable(ctx, params) (*Settings, error)
POST/zones/{zone_id}/email/routing/disable
Enable Email Routing
Deprecated
client.EmailRouting.Enable(ctx, params) (*Settings, error)
POST/zones/{zone_id}/email/routing/enable
ModelsExpand Collapse
type Settings struct{…}
ID string

Email Routing settings identifier.

maxLength32
Enabled SettingsEnabled

State of the zone settings for Email Routing.

One of the following:
const SettingsEnabledTrue SettingsEnabled = true
const SettingsEnabledFalse SettingsEnabled = false
Name string

Domain of your zone.

Created Timeoptional

The date and time the settings have been created.

formatdate-time
Modified Timeoptional

The date and time the settings have been modified.

formatdate-time
SkipWizard SettingsSkipWizardoptional

Flag to check if the user skipped the configuration wizard.

One of the following:
const SettingsSkipWizardTrue SettingsSkipWizard = true
const SettingsSkipWizardFalse SettingsSkipWizard = false
Status SettingsStatusoptional

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

One of the following:
const SettingsStatusReady SettingsStatus = "ready"
const SettingsStatusUnconfigured SettingsStatus = "unconfigured"
const SettingsStatusMisconfigured SettingsStatus = "misconfigured"
const SettingsStatusMisconfiguredLocked SettingsStatus = "misconfigured/locked"
const SettingsStatusUnlocked SettingsStatus = "unlocked"
DeprecatedTag stringoptional

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

maxLength32

Email RoutingDNS

Email Routing - DNS settings
client.EmailRouting.DNS.Get(ctx, params) (*DNSGetResponse, error)
GET/zones/{zone_id}/email/routing/dns
Enable Email Routing
client.EmailRouting.DNS.New(ctx, params) (*Settings, error)
POST/zones/{zone_id}/email/routing/dns
Unlock Email Routing
client.EmailRouting.DNS.Edit(ctx, params) (*Settings, error)
PATCH/zones/{zone_id}/email/routing/dns
Disable Email Routing
client.EmailRouting.DNS.Delete(ctx, body) (*SinglePage[DNSRecord], error)
DELETE/zones/{zone_id}/email/routing/dns
ModelsExpand Collapse
type DNSRecord struct{…}

List of records needed to enable an Email Routing zone.

Content stringoptional

DNS record content.

Name stringoptional

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

maxLength255
Priority float64optional

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

maximum65535
minimum0
TTL DNSRecordTTLoptional

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

One of the following:
float64
type DNSRecordTTL float64

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

Type DNSRecordTypeoptional

DNS record type.

One of the following:
const DNSRecordTypeA DNSRecordType = "A"
const DNSRecordTypeAAAA DNSRecordType = "AAAA"
const DNSRecordTypeCNAME DNSRecordType = "CNAME"
const DNSRecordTypeHTTPS DNSRecordType = "HTTPS"
const DNSRecordTypeTXT DNSRecordType = "TXT"
const DNSRecordTypeSRV DNSRecordType = "SRV"
const DNSRecordTypeLOC DNSRecordType = "LOC"
const DNSRecordTypeMX DNSRecordType = "MX"
const DNSRecordTypeNS DNSRecordType = "NS"
const DNSRecordTypeCERT DNSRecordType = "CERT"
const DNSRecordTypeDNSKEY DNSRecordType = "DNSKEY"
const DNSRecordTypeDS DNSRecordType = "DS"
const DNSRecordTypeNAPTR DNSRecordType = "NAPTR"
const DNSRecordTypeSMIMEA DNSRecordType = "SMIMEA"
const DNSRecordTypeSSHFP DNSRecordType = "SSHFP"
const DNSRecordTypeSVCB DNSRecordType = "SVCB"
const DNSRecordTypeTLSA DNSRecordType = "TLSA"
const DNSRecordTypeURI DNSRecordType = "URI"

Email RoutingRules

List routing rules
client.EmailRouting.Rules.List(ctx, params) (*V4PagePaginationArray[EmailRoutingRule], error)
GET/zones/{zone_id}/email/routing/rules
Get routing rule
client.EmailRouting.Rules.Get(ctx, ruleIdentifier, query) (*EmailRoutingRule, error)
GET/zones/{zone_id}/email/routing/rules/{rule_identifier}
Create routing rule
client.EmailRouting.Rules.New(ctx, params) (*EmailRoutingRule, error)
POST/zones/{zone_id}/email/routing/rules
Update routing rule
client.EmailRouting.Rules.Update(ctx, ruleIdentifier, params) (*EmailRoutingRule, error)
PUT/zones/{zone_id}/email/routing/rules/{rule_identifier}
Delete routing rule
client.EmailRouting.Rules.Delete(ctx, ruleIdentifier, body) (*EmailRoutingRule, error)
DELETE/zones/{zone_id}/email/routing/rules/{rule_identifier}
ModelsExpand Collapse
type Action struct{…}

Actions pattern.

Type ActionType

Type of supported action.

One of the following:
const ActionTypeDrop ActionType = "drop"
const ActionTypeForward ActionType = "forward"
const ActionTypeWorker ActionType = "worker"
Value []stringoptional
type EmailRoutingRule 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 EmailRoutingRuleEnabledoptional

Routing rule status.

One of the following:
const EmailRoutingRuleEnabledTrue EmailRoutingRuleEnabled = true
const EmailRoutingRuleEnabledFalse EmailRoutingRuleEnabled = 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
DeprecatedTag stringoptional

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

maxLength32
type Matcher struct{…}

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

Email RoutingRulesCatch Alls

Get catch-all rule
client.EmailRouting.Rules.CatchAlls.Get(ctx, query) (*RuleCatchAllGetResponse, error)
GET/zones/{zone_id}/email/routing/rules/catch_all
Update catch-all rule
client.EmailRouting.Rules.CatchAlls.Update(ctx, params) (*RuleCatchAllUpdateResponse, error)
PUT/zones/{zone_id}/email/routing/rules/catch_all
ModelsExpand Collapse
type CatchAllAction struct{…}

Action for the catch-all routing rule.

Type CatchAllActionType

Type of action for catch-all rule.

One of the following:
const CatchAllActionTypeDrop CatchAllActionType = "drop"
const CatchAllActionTypeForward CatchAllActionType = "forward"
const CatchAllActionTypeWorker CatchAllActionType = "worker"
Value []stringoptional
type CatchAllMatcher struct{…}

Matcher for catch-all routing rule.

Type CatchAllMatcherType

Type of matcher. Default is 'all'.

Email RoutingAddresses

List destination addresses
client.EmailRouting.Addresses.List(ctx, params) (*V4PagePaginationArray[Address], error)
GET/accounts/{account_id}/email/routing/addresses
Get a destination address
client.EmailRouting.Addresses.Get(ctx, destinationAddressIdentifier, query) (*Address, error)
GET/accounts/{account_id}/email/routing/addresses/{destination_address_identifier}
Create a destination address
client.EmailRouting.Addresses.New(ctx, params) (*Address, error)
POST/accounts/{account_id}/email/routing/addresses
Delete destination address
client.EmailRouting.Addresses.Delete(ctx, destinationAddressIdentifier, body) (*Address, error)
DELETE/accounts/{account_id}/email/routing/addresses/{destination_address_identifier}
ModelsExpand Collapse
type Address struct{…}
ID stringoptional

Destination address identifier.

maxLength32
Created Timeoptional

The date and time the destination address has been created.

formatdate-time
Email stringoptional

The contact email address of the user.

maxLength90
Modified Timeoptional

The date and time the destination address was last modified.

formatdate-time
DeprecatedTag stringoptional

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

maxLength32
Verified Timeoptional

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

formatdate-time