---
title: Get an email domain
---

[Skip to content](#_top)

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

[Email Security](https://developers.cloudflare.com/api/python/resources/email_security)

[Settings](https://developers.cloudflare.com/api/python/resources/email_security/subresources/settings)

[Domains](https://developers.cloudflare.com/api/python/resources/email_security/subresources/settings/subresources/domains)

Copy Markdown

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

---

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

# Get an email domain

email\_security.settings.domains.get(strdomain\_id, DomainGetParams\*\*kwargs) -> [DomainGetResponse](<https://developers.cloudflare.com/api/python/resources/email_security#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)>)

GET/accounts/{account\_id}/email-security/settings/domains/{domain\_id}

Retrieves detailed information for a specific protected email domain including its delivery configuration, SPF/DMARC status, and authorization state.

##### 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)

`Cloud Email Security: Write``Cloud Email Security: Read`

##### ParametersExpand Collapse

account\_id: str

Identifier.

maxLength32

[Link to this property](<#(resource)%20email_security.settings.domains%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20account_id%20%3E%20(schema)>)

domain\_id: str

Domain identifier.

formatuuid

[Link to this property](<#(resource)%20email_security.settings.domains%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20domain_id%20%3E%20(schema)>)

##### ReturnsExpand Collapse

<details>

<summary>

class DomainGetResponse: …

</summary>

id: Optional\[str]

Domain identifier.

formatuuid

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

<details>

<summary>

allowed\_delivery\_modes: Optional\[List\[Literal\["DIRECT", "BCC", "JOURNAL", 2 more]]]

</summary>

One of the following:

"DIRECT"

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20allowed_delivery_modes%20%3E%20(items)%20%3E%20(member)%200">Link to this property</a>

"BCC"

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20allowed_delivery_modes%20%3E%20(items)%20%3E%20(member)%201">Link to this property</a>

"JOURNAL"

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20allowed_delivery_modes%20%3E%20(items)%20%3E%20(member)%202">Link to this property</a>

"API"

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20allowed_delivery_modes%20%3E%20(items)%20%3E%20(member)%203">Link to this property</a>

"RETRO\_SCAN"

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20allowed_delivery_modes%20%3E%20(items)%20%3E%20(member)%204">Link to this property</a>

</details>

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20allowed_delivery_modes">Link to this property</a>

<details>

<summary>

authorization: Optional\[Authorization]

</summary>

authorized: bool

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20authorization%20%3E%20(property)%20authorized">Link to this property</a>

timestamp: datetime

formatdate-time

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20authorization%20%3E%20(property)%20timestamp">Link to this property</a>

status\_message: Optional\[str]

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20authorization%20%3E%20(property)%20status_message">Link to this property</a>

</details>

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20authorization">Link to this property</a>

created\_at: Optional\[datetime]

formatdate-time

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20created_at">Link to this property</a>

<details>

<summary>

dmarc\_status: Optional\[Literal\["none", "good", "invalid"]]

</summary>

One of the following:

"none"

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20dmarc_status%20%3E%20(member)%200">Link to this property</a>

"good"

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20dmarc_status%20%3E%20(member)%201">Link to this property</a>

"invalid"

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20dmarc_status%20%3E%20(member)%202">Link to this property</a>

</details>

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20dmarc_status">Link to this property</a>

domain: Optional\[str]

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20domain">Link to this property</a>

<details>

<summary>

drop\_dispositions: Optional\[List\[Literal\["MALICIOUS", "MALICIOUS-BEC", "SUSPICIOUS", 7 more]]]

</summary>

One of the following:

"MALICIOUS"

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20drop_dispositions%20%3E%20(items)%20%3E%20(member)%200">Link to this property</a>

"MALICIOUS-BEC"

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20drop_dispositions%20%3E%20(items)%20%3E%20(member)%201">Link to this property</a>

"SUSPICIOUS"

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20drop_dispositions%20%3E%20(items)%20%3E%20(member)%202">Link to this property</a>

"SPOOF"

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20drop_dispositions%20%3E%20(items)%20%3E%20(member)%203">Link to this property</a>

"SPAM"

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20drop_dispositions%20%3E%20(items)%20%3E%20(member)%204">Link to this property</a>

"BULK"

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20drop_dispositions%20%3E%20(items)%20%3E%20(member)%205">Link to this property</a>

"ENCRYPTED"

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20drop_dispositions%20%3E%20(items)%20%3E%20(member)%206">Link to this property</a>

"EXTERNAL"

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20drop_dispositions%20%3E%20(items)%20%3E%20(member)%207">Link to this property</a>

"UNKNOWN"

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20drop_dispositions%20%3E%20(items)%20%3E%20(member)%208">Link to this property</a>

"NONE"

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20drop_dispositions%20%3E%20(items)%20%3E%20(member)%209">Link to this property</a>

</details>

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20drop_dispositions">Link to this property</a>

<details>

<summary>

emails\_processed: Optional\[EmailsProcessed]

</summary>

timestamp: datetime

formatdate-time

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20emails_processed%20%3E%20(property)%20timestamp">Link to this property</a>

total\_emails\_processed: int

minimum0

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20emails_processed%20%3E%20(property)%20total_emails_processed">Link to this property</a>

total\_emails\_processed\_previous: int

minimum0

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20emails_processed%20%3E%20(property)%20total_emails_processed_previous">Link to this property</a>

</details>

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20emails_processed">Link to this property</a>

<details>

<summary>

folder: Optional\[Literal\["AllItems", "Inbox"]]

The mailbox folder to scan, for API-scanning domains.

</summary>

One of the following:

"AllItems"

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20folder%20%3E%20(member)%200">Link to this property</a>

"Inbox"

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20folder%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20folder">Link to this property</a>

<details>

<summary>

inbox\_provider: Optional\[Literal\["Microsoft", "Google"]]

</summary>

One of the following:

"Microsoft"

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20inbox_provider%20%3E%20(member)%200">Link to this property</a>

"Google"

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20inbox_provider%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20inbox_provider">Link to this property</a>

integration\_id: Optional\[str]

formatuuid

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20integration_id">Link to this property</a>

ip\_restrictions: Optional\[List\[str]]

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20ip_restrictions">Link to this property</a>

Deprecatedlast\_modified: Optional\[datetime]

Use <code>modified_at</code> instead.

Deprecated, use <code>modified_at</code> instead. End of life: November 1, 2026.

formatdate-time

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20last_modified">Link to this property</a>

lookback\_hops: Optional\[int]

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20lookback_hops">Link to this property</a>

modified\_at: Optional\[datetime]

formatdate-time

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20modified_at">Link to this property</a>

o365\_tenant\_id: Optional\[str]

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20o365_tenant_id">Link to this property</a>

<details>

<summary>

regions: Optional\[List\[Literal\["GLOBAL", "AU", "DE", 2 more]]]

</summary>

One of the following:

"GLOBAL"

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20regions%20%3E%20(items)%20%3E%20(member)%200">Link to this property</a>

"AU"

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20regions%20%3E%20(items)%20%3E%20(member)%201">Link to this property</a>

"DE"

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20regions%20%3E%20(items)%20%3E%20(member)%202">Link to this property</a>

"IN"

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20regions%20%3E%20(items)%20%3E%20(member)%203">Link to this property</a>

"US"

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20regions%20%3E%20(items)%20%3E%20(member)%204">Link to this property</a>

</details>

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20regions">Link to this property</a>

require\_tls\_inbound: Optional\[bool]

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20require_tls_inbound">Link to this property</a>

require\_tls\_outbound: Optional\[bool]

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20require_tls_outbound">Link to this property</a>

<details>

<summary>

spf\_status: Optional\[Literal\["none", "good", "neutral", 2 more]]

</summary>

One of the following:

"none"

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20spf_status%20%3E%20(member)%200">Link to this property</a>

"good"

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20spf_status%20%3E%20(member)%201">Link to this property</a>

"neutral"

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20spf_status%20%3E%20(member)%202">Link to this property</a>

"open"

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20spf_status%20%3E%20(member)%203">Link to this property</a>

"invalid"

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20spf_status%20%3E%20(member)%204">Link to this property</a>

</details>

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20spf_status">Link to this property</a>

<details>

<summary>

status: Optional\[Literal\["PENDING", "ACTIVE", "FAILED", "TIMEOUT"]]

</summary>

One of the following:

"PENDING"

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

"ACTIVE"

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

"FAILED"

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

"TIMEOUT"

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

</details>

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

transport: Optional\[str]

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)%20%3E%20(property)%20transport">Link to this property</a>

</details>

[Link to this property](<#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_get_response%20%3E%20(schema)>)

### Get an email domain

Python

HTTPTypeScriptPythonGoTerraform

```
import os
from cloudflare import Cloudflare

client = Cloudflare(
    api_token=os.environ.get("CLOUDFLARE_API_TOKEN"),  # This is the default and can be omitted
)
domain = client.email_security.settings.domains.get(
    domain_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
    account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
print(domain.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": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
    "allowed_delivery_modes": [
      "DIRECT"
    ],
    "authorization": {
      "authorized": true,
      "timestamp": "2019-12-27T18:11:19.117Z",
      "status_message": "status_message"
    },
    "created_at": "2014-01-01T05:20:00.12345Z",
    "dmarc_status": "none",
    "domain": "example.com",
    "drop_dispositions": [
      "MALICIOUS"
    ],
    "emails_processed": {
      "timestamp": "2019-12-27T18:11:19.117Z",
      "total_emails_processed": 0,
      "total_emails_processed_previous": 0
    },
    "folder": "AllItems",
    "inbox_provider": "Microsoft",
    "integration_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "ip_restrictions": [
      "192.0.2.0/24",
      "2001:db8::/32"
    ],
    "last_modified": "2014-01-01T05:20:00.12345Z",
    "lookback_hops": 0,
    "modified_at": "2014-01-01T05:20:00.12345Z",
    "o365_tenant_id": "o365_tenant_id",
    "regions": [
      "GLOBAL"
    ],
    "require_tls_inbound": true,
    "require_tls_outbound": true,
    "spf_status": "none",
    "status": "PENDING",
    "transport": "transport"
  }
}
```

##### 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": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
    "allowed_delivery_modes": [
      "DIRECT"
    ],
    "authorization": {
      "authorized": true,
      "timestamp": "2019-12-27T18:11:19.117Z",
      "status_message": "status_message"
    },
    "created_at": "2014-01-01T05:20:00.12345Z",
    "dmarc_status": "none",
    "domain": "example.com",
    "drop_dispositions": [
      "MALICIOUS"
    ],
    "emails_processed": {
      "timestamp": "2019-12-27T18:11:19.117Z",
      "total_emails_processed": 0,
      "total_emails_processed_previous": 0
    },
    "folder": "AllItems",
    "inbox_provider": "Microsoft",
    "integration_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "ip_restrictions": [
      "192.0.2.0/24",
      "2001:db8::/32"
    ],
    "last_modified": "2014-01-01T05:20:00.12345Z",
    "lookback_hops": 0,
    "modified_at": "2014-01-01T05:20:00.12345Z",
    "o365_tenant_id": "o365_tenant_id",
    "regions": [
      "GLOBAL"
    ],
    "require_tls_inbound": true,
    "require_tls_outbound": true,
    "spf_status": "none",
    "status": "PENDING",
    "transport": "transport"
  }
}
```