Skip to content
Start here

List protected email domains

GET/accounts/{account_id}/email-security/settings/domains

Lists, searches, and sorts an account’s email domains.

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)
Cloud Email Security: WriteCloud Email Security: Read
Path ParametersExpand Collapse
account_id: optional string

Account Identifier

maxLength32
minLength32
Query ParametersExpand Collapse
active_delivery_mode: optional "DIRECT" or "BCC" or "JOURNAL" or 2 more

Filters response to domains with the currently active delivery mode.

One of the following:
"DIRECT"
"BCC"
"JOURNAL"
"API"
"RETRO_SCAN"
allowed_delivery_mode: optional "DIRECT" or "BCC" or "JOURNAL" or 2 more

Filters response to domains with the provided delivery mode.

One of the following:
"DIRECT"
"BCC"
"JOURNAL"
"API"
"RETRO_SCAN"
direction: optional "asc" or "desc"

The sorting direction.

One of the following:
"asc"
"desc"
domain: optional array of string

Filters results by the provided domains, allowing for multiple occurrences.

integration_id: optional string

Filters response to domains with the provided integration ID.

formatuuid
order: optional "domain" or "created_at"

The field to sort by.

One of the following:
"domain"
"created_at"
page: optional number

The page number of paginated results.

formatint32
minimum1
per_page: optional number

The number of results per page.

formatint32
minimum1
ReturnsExpand Collapse
errors: array of ResponseInfo { code, message, documentation_url, source }
code: number
minimum1000
message: string
documentation_url: optional string
source: optional object { pointer }
pointer: optional string
messages: array of ResponseInfo { code, message, documentation_url, source }
code: number
minimum1000
message: string
documentation_url: optional string
source: optional object { pointer }
pointer: optional string
result: array of object { id, allowed_delivery_modes, created_at, 17 more }
id: number

The unique identifier for the domain.

formatint32
allowed_delivery_modes: array of "DIRECT" or "BCC" or "JOURNAL" or 2 more
One of the following:
"DIRECT"
"BCC"
"JOURNAL"
"API"
"RETRO_SCAN"
created_at: string
formatdate-time
domain: string
drop_dispositions: array of "MALICIOUS" or "MALICIOUS-BEC" or "SUSPICIOUS" or 7 more
One of the following:
"MALICIOUS"
"MALICIOUS-BEC"
"SUSPICIOUS"
"SPOOF"
"SPAM"
"BULK"
"ENCRYPTED"
"EXTERNAL"
"UNKNOWN"
"NONE"
ip_restrictions: array of string
last_modified: string
formatdate-time
lookback_hops: number
formatint32
regions: array of "GLOBAL" or "AU" or "DE" or 2 more
One of the following:
"GLOBAL"
"AU"
"DE"
"IN"
"US"
transport: string
authorization: optional object { authorized, timestamp, status_message }
authorized: boolean
timestamp: string
formatdate-time
status_message: optional string
dmarc_status: optional "none" or "good" or "invalid"
One of the following:
"none"
"good"
"invalid"
emails_processed: optional object { timestamp, total_emails_processed, total_emails_processed_previous }
timestamp: string
formatdate-time
total_emails_processed: number
formatint32
minimum0
total_emails_processed_previous: number
formatint32
minimum0
folder: optional "AllItems" or "Inbox"
One of the following:
"AllItems"
"Inbox"
inbox_provider: optional "Microsoft" or "Google"
One of the following:
"Microsoft"
"Google"
integration_id: optional string
formatuuid
o365_tenant_id: optional string
require_tls_inbound: optional boolean
require_tls_outbound: optional boolean
spf_status: optional "none" or "good" or "neutral" or 2 more
One of the following:
"none"
"good"
"neutral"
"open"
"invalid"
result_info: object { count, page, per_page, total_count }
count: number

Total number of results for the requested service

formatint32
page: number

Current page within paginated list of results

formatint32
per_page: number

Number of results per page of results

formatint32
total_count: number

Total results available without any search parameters

formatint32
success: boolean

List protected email domains

curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/email-security/settings/domains \
    -H "X-Auth-Email: $CLOUDFLARE_EMAIL" \
    -H "X-Auth-Key: $CLOUDFLARE_API_KEY"
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": [
    {
      "id": 2400,
      "allowed_delivery_modes": [
        "API"
      ],
      "created_at": "2023-11-14T22:13:20Z",
      "domain": "example.com",
      "drop_dispositions": [
        "MALICIOUS",
        "SPAM"
      ],
      "ip_restrictions": [
        "string"
      ],
      "last_modified": "2023-11-14T22:13:20Z",
      "lookback_hops": 2,
      "regions": [
        "GLOBAL"
      ],
      "transport": "example.com",
      "authorization": {
        "authorized": true,
        "timestamp": "2019-12-27T18:11:19.117Z",
        "status_message": "status_message"
      },
      "dmarc_status": "good",
      "emails_processed": {
        "timestamp": "2019-12-27T18:11:19.117Z",
        "total_emails_processed": 0,
        "total_emails_processed_previous": 0
      },
      "folder": "Inbox",
      "inbox_provider": "Microsoft",
      "integration_id": "a5dbb180-60ea-4578-84bb-d01a5d4e50c3",
      "o365_tenant_id": "c3c3239d-8858-47df-9618-0e2d9bdf6aa8",
      "require_tls_inbound": false,
      "require_tls_outbound": true,
      "spf_status": "good"
    }
  ],
  "result_info": {
    "count": 1,
    "page": 1,
    "per_page": 20,
    "total_count": 2000
  },
  "success": true
}
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"
      }
    }
  ],
  "result": [
    {
      "id": 2400,
      "allowed_delivery_modes": [
        "API"
      ],
      "created_at": "2023-11-14T22:13:20Z",
      "domain": "example.com",
      "drop_dispositions": [
        "MALICIOUS",
        "SPAM"
      ],
      "ip_restrictions": [
        "string"
      ],
      "last_modified": "2023-11-14T22:13:20Z",
      "lookback_hops": 2,
      "regions": [
        "GLOBAL"
      ],
      "transport": "example.com",
      "authorization": {
        "authorized": true,
        "timestamp": "2019-12-27T18:11:19.117Z",
        "status_message": "status_message"
      },
      "dmarc_status": "good",
      "emails_processed": {
        "timestamp": "2019-12-27T18:11:19.117Z",
        "total_emails_processed": 0,
        "total_emails_processed_previous": 0
      },
      "folder": "Inbox",
      "inbox_provider": "Microsoft",
      "integration_id": "a5dbb180-60ea-4578-84bb-d01a5d4e50c3",
      "o365_tenant_id": "c3c3239d-8858-47df-9618-0e2d9bdf6aa8",
      "require_tls_inbound": false,
      "require_tls_outbound": true,
      "spf_status": "good"
    }
  ],
  "result_info": {
    "count": 1,
    "page": 1,
    "per_page": 20,
    "total_count": 2000
  },
  "success": true
}