Overview
Cloudflare Email Routing allows you to create custom email addresses for your domain and route them to your preferred email inbox. Manage routing rules, destination addresses, and DNS records.Initialize the client
Settings
Manage Email Routing settings for a zone.Get settings
Get information about Email Routing settings for your zone.Zone identifier
Email Routing settings identifier
State of Email Routing (enabled or disabled)
Domain of your zone
Account status:
ready, unconfigured, misconfigured, misconfigured/locked, or unlockedWhen the settings were created
When the settings were last modified
Whether the user skipped the configuration wizard
Enable Email Routing (deprecated)
Enable Email Routing for your zone. This adds and locks necessary MX and SPF records.Disable Email Routing (deprecated)
Disable Email Routing for your zone. This removes additional MX records.Rules
Manage email routing rules.Create a rule
Create a new routing rule.Zone identifier
Matching rules to filter emails
Actions to perform on matched emails
Whether the rule is enabled (default: true)
Rule name
Rule priority (lower values execute first)
Update a rule
Update an existing routing rule.List rules
List all routing rules for a zone.Get a rule
Get details of a specific routing rule.Delete a rule
Delete a routing rule.Addresses
Manage destination email addresses.Create an address
Add a verified destination address.Account identifier
The email address to verify and use as a destination
List addresses
List all verified destination addresses.Get an address
Get details of a destination address.Delete an address
Remove a destination address.DNS
Manage DNS records for Email Routing.Types
Matcher
Defines how to match incoming emails.Matcher type
Email field to match against
Value to match (for literal matchers)
Action
Defines what to do with matched emails.Action type
Destination addresses (for forward action)
EmailRoutingRule
Rule identifier
Rule tag
Rule name
Whether the rule is active
Matching conditions
Actions to perform
Rule priority