Skip to content
Start here

Delete destination address

client.emailRouting.addresses.delete(stringdestinationAddressIdentifier, AddressDeleteParams { account_id } params, RequestOptionsoptions?): Address { id, created, email, 3 more }
DELETE/accounts/{account_id}/email/routing/addresses/{destination_address_identifier}

Deletes a specific destination address.

Security

API Email + API Key

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

Example:X-Auth-Email: user@example.com

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

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
Accepted Permissions (at least one required)
Email Routing Addresses Write
ParametersExpand Collapse
destinationAddressIdentifier: string

Destination address identifier.

maxLength32
params: AddressDeleteParams { account_id }
account_id: string

Identifier.

maxLength32
ReturnsExpand Collapse
Address { id, created, email, 3 more }
id?: string

Destination address identifier.

maxLength32
created?: string

The date and time the destination address has been created.

formatdate-time
email?: string

The contact email address of the user.

maxLength90
modified?: string

The date and time the destination address was last modified.

formatdate-time
Deprecatedtag?: string

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

maxLength32
verified?: string

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

formatdate-time

Delete destination address

import Cloudflare from 'cloudflare';

const client = new Cloudflare({
  apiEmail: process.env['CLOUDFLARE_EMAIL'], // This is the default and can be omitted
  apiKey: process.env['CLOUDFLARE_API_KEY'], // This is the default and can be omitted
});

const address = await client.emailRouting.addresses.delete('ea95132c15732412d22c1476fa83f27a', {
  account_id: '023e105f4ecef8ad9ca31a8372d0c353',
});

console.log(address.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": "ea95132c15732412d22c1476fa83f27a",
    "created": "2014-01-02T02:20:00Z",
    "email": "user@example.com",
    "modified": "2014-01-02T02:20:00Z",
    "tag": "ea95132c15732412d22c1476fa83f27a",
    "verified": "2014-01-02T02:20:00Z"
  }
}
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": "ea95132c15732412d22c1476fa83f27a",
    "created": "2014-01-02T02:20:00Z",
    "email": "user@example.com",
    "modified": "2014-01-02T02:20:00Z",
    "tag": "ea95132c15732412d22c1476fa83f27a",
    "verified": "2014-01-02T02:20:00Z"
  }
}