---
title: Disable Email Routing
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/go)

[Email Routing](https://developers.cloudflare.com/api/go/resources/email_routing)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Disable Email Routing

Deprecated

client.EmailRouting.Disable(ctx, body) (\*[Settings](<https://developers.cloudflare.com/api/go/resources/email_routing#(resource)%20email_routing%20%3E%20(model)%20settings%20%3E%20(schema)>), error)

POST/zones/{zone\_id}/email/routing/disable

Disable your Email Routing zone. Also removes additional MX records previously required for Email Routing to work.

##### Security

<details>

<summary>API Token</summary>



The preferred authorization scheme for interacting with the Cloudflare API. <a href="https://developers.cloudflare.com/fundamentals/api/get-started/create-token/">Create a token</a>.

**Example:**<code>Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY</code>

</details>

<details>

<summary>API Email + API Key</summary>



The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

**Example:**<code>X-Auth-Email: user@example.com</code>

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

**Example:**<code>X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194</code>

</details>

##### Accepted Permissions (at least one required)

`Zone Settings Write`

##### ParametersExpand Collapse

<details>

<summary>

body EmailRoutingDisableParams

</summary>

ZoneID param.Field\[string]

Identifier.

maxLength32

<a href="#(resource)%20email_routing%20%3E%20(method)%20disable%20%3E%20(params)%20default%20%3E%20(param)%20zone_id">Link to this property</a>

</details>

[Link to this property](<#(resource)%20email_routing%20%3E%20(method)%20disable%20%3E%20(params)%20default>)

##### ReturnsExpand Collapse

<details>

<summary>

type Settings struct{…}

</summary>

ID string

Email Routing settings identifier.

maxLength32

<a href="#(resource)%20email_routing%20%3E%20(model)%20settings%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

<details>

<summary>

Enabled SettingsEnabled

State of the zone settings for Email Routing.

</summary>

One of the following:

const SettingsEnabledTrue SettingsEnabled = true

<a href="#(resource)%20email_routing%20%3E%20(model)%20settings%20%3E%20(schema)%20%3E%20(property)%20enabled%20%3E%20(member)%200">Link to this property</a>

const SettingsEnabledFalse SettingsEnabled = false

<a href="#(resource)%20email_routing%20%3E%20(model)%20settings%20%3E%20(schema)%20%3E%20(property)%20enabled%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20email_routing%20%3E%20(model)%20settings%20%3E%20(schema)%20%3E%20(property)%20enabled">Link to this property</a>

Name string

Domain of your zone.

<a href="#(resource)%20email_routing%20%3E%20(model)%20settings%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

Created TimeOptional

The date and time the settings have been created.

formatdate-time

<a href="#(resource)%20email_routing%20%3E%20(model)%20settings%20%3E%20(schema)%20%3E%20(property)%20created">Link to this property</a>

Modified TimeOptional

The date and time the settings have been modified.

formatdate-time

<a href="#(resource)%20email_routing%20%3E%20(model)%20settings%20%3E%20(schema)%20%3E%20(property)%20modified">Link to this property</a>

<details>

<summary>

SkipWizard SettingsSkipWizardOptional

Flag to check if the user skipped the configuration wizard.

</summary>

One of the following:

const SettingsSkipWizardTrue SettingsSkipWizard = true

<a href="#(resource)%20email_routing%20%3E%20(model)%20settings%20%3E%20(schema)%20%3E%20(property)%20skip_wizard%20%3E%20(member)%200">Link to this property</a>

const SettingsSkipWizardFalse SettingsSkipWizard = false

<a href="#(resource)%20email_routing%20%3E%20(model)%20settings%20%3E%20(schema)%20%3E%20(property)%20skip_wizard%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20email_routing%20%3E%20(model)%20settings%20%3E%20(schema)%20%3E%20(property)%20skip_wizard">Link to this property</a>

<details>

<summary>

Status SettingsStatusOptional

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

</summary>

One of the following:

const SettingsStatusReady SettingsStatus = "ready"

<a href="#(resource)%20email_routing%20%3E%20(model)%20settings%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%200">Link to this property</a>

const SettingsStatusUnconfigured SettingsStatus = "unconfigured"

<a href="#(resource)%20email_routing%20%3E%20(model)%20settings%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%201">Link to this property</a>

const SettingsStatusMisconfigured SettingsStatus = "misconfigured"

<a href="#(resource)%20email_routing%20%3E%20(model)%20settings%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%202">Link to this property</a>

const SettingsStatusMisconfiguredLocked SettingsStatus = "misconfigured/locked"

<a href="#(resource)%20email_routing%20%3E%20(model)%20settings%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%203">Link to this property</a>

const SettingsStatusUnlocked SettingsStatus = "unlocked"

<a href="#(resource)%20email_routing%20%3E%20(model)%20settings%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%204">Link to this property</a>

</details>

<a href="#(resource)%20email_routing%20%3E%20(model)%20settings%20%3E%20(schema)%20%3E%20(property)%20status">Link to this property</a>

<details>

<summary>

SupportSubaddress SettingsSupportSubaddressOptional

Whether subaddressing (plus-addressing) is honored when matching incoming mail against routing rules.

</summary>

One of the following:

const SettingsSupportSubaddressTrue SettingsSupportSubaddress = true

<a href="#(resource)%20email_routing%20%3E%20(model)%20settings%20%3E%20(schema)%20%3E%20(property)%20support_subaddress%20%3E%20(member)%200">Link to this property</a>

const SettingsSupportSubaddressFalse SettingsSupportSubaddress = false

<a href="#(resource)%20email_routing%20%3E%20(model)%20settings%20%3E%20(schema)%20%3E%20(property)%20support_subaddress%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20email_routing%20%3E%20(model)%20settings%20%3E%20(schema)%20%3E%20(property)%20support_subaddress">Link to this property</a>

DeprecatedTag stringOptional

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

maxLength32

<a href="#(resource)%20email_routing%20%3E%20(model)%20settings%20%3E%20(schema)%20%3E%20(property)%20tag">Link to this property</a>

</details>

[Link to this property](<#(resource)%20email_routing%20%3E%20(model)%20settings%20%3E%20(schema)>)

### Disable Email Routing

Go

HTTPTypeScriptPythonGoTerraform

```
package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/email_routing"
  "github.com/cloudflare/cloudflare-go/option"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  settings, err := client.EmailRouting.Disable(context.TODO(), email_routing.EmailRoutingDisableParams{
    ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", settings.ID)
}
```

200 example

```
{
  "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

200 example

```
{
  "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"
  }
}
```