Apply Email Routing settings
email_routing.update(EmailRoutingUpdateParams**kwargs) -> Settings
PUT/zones/{zone_id}/email/routing
Apply the provided settings to your Email Routing zone. Omitted settings retain their current values, as with PATCH.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Accepted Permissions (at least one required)
Apply Email Routing settings
import os
from cloudflare import Cloudflare
client = Cloudflare(
api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted
)
settings = client.email_routing.update(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
print(settings.id){
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"success": true,
"result": {
"id": "75610dab9e69410a82cf7e400a09ecec",
"enabled": true,
"name": "example.net",
"created": "2014-01-02T02:20:00Z",
"modified": "2014-01-02T02:20:00Z",
"skip_wizard": true,
"status": "ready",
"support_subaddress": true,
"tag": "75610dab9e69410a82cf7e400a09ecec"
}
}Returns Examples
{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"success": true,
"result": {
"id": "75610dab9e69410a82cf7e400a09ecec",
"enabled": true,
"name": "example.net",
"created": "2014-01-02T02:20:00Z",
"modified": "2014-01-02T02:20:00Z",
"skip_wizard": true,
"status": "ready",
"support_subaddress": true,
"tag": "75610dab9e69410a82cf7e400a09ecec"
}
}