Apply Email Routing settings
client.emailRouting.update(EmailRoutingUpdateParams { zone_id, enabled, skip_wizard, support_subaddress } params, RequestOptionsoptions?): Settings { id, enabled, name, 6 more }
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 Cloudflare from 'cloudflare';
const client = new Cloudflare({
apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});
const settings = await client.emailRouting.update({ zone_id: '023e105f4ecef8ad9ca31a8372d0c353' });
console.log(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"
}
}