---
title: Update an email domain
---

[Skip to content](#_top)

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

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

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

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

Copy Markdown

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

---

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

# Update an email domain

client.emailSecurity.settings.domains.edit(stringdomainID, DomainEditParams {account\_id, allowed\_delivery\_modes, drop\_dispositions, 8 more } params, RequestOptionsoptions?): [DomainEditResponse](<https://developers.cloudflare.com/api/typescript/resources/email_security#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_edit_response%20%3E%20(schema)>) {id, allowed\_delivery\_modes, authorization, 19 more }

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

Updates configuration for a protected email domain. Only provided fields will be modified. Changes affect delivery mode, security settings, and regional processing.

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

##### ParametersExpand Collapse

domainID: string

Domain identifier.

formatuuid

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

<details>

<summary>

params: DomainEditParams {account\_id, allowed\_delivery\_modes, drop\_dispositions, 8 more }

</summary>

account\_id: string

Path param: Identifier.

maxLength32

<a href="#(resource)%20email_security.settings.domains%20%3E%20(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20account_id">Link to this property</a>

<details>

<summary>

allowed\_delivery\_modes?: Array&lt;"DIRECT"| "BCC"| "JOURNAL"| 2 more&gt;

Body param: Delivery modes to onboard the domain through.

</summary>

One of the following:

"DIRECT"

<a href="#(resource)%20email_security.settings.domains%20%3E%20(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20allowed_delivery_modes%20%3E%20(schema)%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(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20allowed_delivery_modes%20%3E%20(schema)%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(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20allowed_delivery_modes%20%3E%20(schema)%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(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20allowed_delivery_modes%20%3E%20(schema)%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(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20allowed_delivery_modes%20%3E%20(schema)%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(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20allowed_delivery_modes">Link to this property</a>

<details>

<summary>

drop\_dispositions?: Array&lt;"MALICIOUS"| "MALICIOUS-BEC"| "SUSPICIOUS"| 7 more&gt;

Body param: Dispositions to drop instead of delivering, e.g. <code>["MALICIOUS", "SPAM"]</code>.

</summary>

One of the following:

"MALICIOUS"

<a href="#(resource)%20email_security.settings.domains%20%3E%20(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20drop_dispositions%20%3E%20(schema)%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(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20drop_dispositions%20%3E%20(schema)%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(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20drop_dispositions%20%3E%20(schema)%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(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20drop_dispositions%20%3E%20(schema)%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(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20drop_dispositions%20%3E%20(schema)%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(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20drop_dispositions%20%3E%20(schema)%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(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20drop_dispositions%20%3E%20(schema)%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(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20drop_dispositions%20%3E%20(schema)%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(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20drop_dispositions%20%3E%20(schema)%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(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20drop_dispositions%20%3E%20(schema)%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(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20drop_dispositions">Link to this property</a>

<details>

<summary>

folder?: "AllItems"| "Inbox"| null

Body param: 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(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20folder%20%3E%20(schema)%20%3E%20(member)%200">Link to this property</a>

"Inbox"

<a href="#(resource)%20email_security.settings.domains%20%3E%20(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20folder%20%3E%20(schema)%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20email_security.settings.domains%20%3E%20(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20folder">Link to this property</a>

integration\_id?: string| null

Body param: Identifier of the CASB integration that authorizes this domain. The integration also enables API scanning, post-delivery actions, and directory sync.

formatuuid

<a href="#(resource)%20email_security.settings.domains%20%3E%20(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20integration_id">Link to this property</a>

ip\_restrictions?: Array&lt;string&gt;

Body param: Source IP ranges mail is accepted from. Any other source is rejected.

<a href="#(resource)%20email_security.settings.domains%20%3E%20(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20ip_restrictions">Link to this property</a>

lookback\_hops?: number

Body param: Number of hops to trace back through received headers when reconstructing the original message (1-20).

maximum20

minimum1

<a href="#(resource)%20email_security.settings.domains%20%3E%20(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20lookback_hops">Link to this property</a>

<details>

<summary>

regions?: Array&lt;"GLOBAL"| "AU"| "DE"| 2 more&gt;

Body param: Regions that process messages for this domain, e.g. <code>["GLOBAL"]</code> or <code>["US"]</code>.

</summary>

One of the following:

"GLOBAL"

<a href="#(resource)%20email_security.settings.domains%20%3E%20(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20regions%20%3E%20(schema)%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(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20regions%20%3E%20(schema)%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(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20regions%20%3E%20(schema)%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(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20regions%20%3E%20(schema)%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(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20regions%20%3E%20(schema)%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(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20regions">Link to this property</a>

require\_tls\_inbound?: boolean

Body param: Require TLS on inbound connections.

<a href="#(resource)%20email_security.settings.domains%20%3E%20(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20require_tls_inbound">Link to this property</a>

require\_tls\_outbound?: boolean

Body param: Require TLS on outbound connections.

<a href="#(resource)%20email_security.settings.domains%20%3E%20(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20require_tls_outbound">Link to this property</a>

transport?: string

Body param: The mail transport hostname for MX/Inline delivery — the MX record Cloudflare delivers email to (e.g. <code>mx.example.com</code>).

<a href="#(resource)%20email_security.settings.domains%20%3E%20(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20transport">Link to this property</a>

</details>

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

##### ReturnsExpand Collapse

<details>

<summary>

DomainEditResponse {id, allowed\_delivery\_modes, authorization, 19 more }

</summary>

id?: string

Domain identifier.

formatuuid

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

<details>

<summary>

allowed\_delivery\_modes?: Array&lt;"DIRECT"| "BCC"| "JOURNAL"| 2 more&gt;

</summary>

One of the following:

"DIRECT"

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_edit_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_edit_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_edit_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_edit_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_edit_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_edit_response%20%3E%20(schema)%20%3E%20(property)%20allowed_delivery_modes">Link to this property</a>

<details>

<summary>

authorization?: Authorization| null

</summary>

authorized: boolean

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

timestamp: string

formatdate-time

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

status\_message?: string| null

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_edit_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_edit_response%20%3E%20(schema)%20%3E%20(property)%20authorization">Link to this property</a>

created\_at?: string

formatdate-time

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

<details>

<summary>

dmarc\_status?: "none"| "good"| "invalid"| null

</summary>

One of the following:

"none"

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_edit_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_edit_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_edit_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_edit_response%20%3E%20(schema)%20%3E%20(property)%20dmarc_status">Link to this property</a>

domain?: string

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

<details>

<summary>

drop\_dispositions?: Array&lt;"MALICIOUS"| "MALICIOUS-BEC"| "SUSPICIOUS"| 7 more&gt;

</summary>

One of the following:

"MALICIOUS"

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_edit_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_edit_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_edit_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_edit_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_edit_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_edit_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_edit_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_edit_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_edit_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_edit_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_edit_response%20%3E%20(schema)%20%3E%20(property)%20drop_dispositions">Link to this property</a>

<details>

<summary>

emails\_processed?: EmailsProcessed| null

</summary>

timestamp: string

formatdate-time

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

total\_emails\_processed: number

minimum0

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_edit_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: number

minimum0

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_edit_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_edit_response%20%3E%20(schema)%20%3E%20(property)%20emails_processed">Link to this property</a>

<details>

<summary>

folder?: "AllItems"| "Inbox"| null

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_edit_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_edit_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_edit_response%20%3E%20(schema)%20%3E%20(property)%20folder">Link to this property</a>

<details>

<summary>

inbox\_provider?: "Microsoft"| "Google"| null

</summary>

One of the following:

"Microsoft"

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_edit_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_edit_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_edit_response%20%3E%20(schema)%20%3E%20(property)%20inbox_provider">Link to this property</a>

integration\_id?: string| null

formatuuid

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

ip\_restrictions?: Array&lt;string&gt;

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

Deprecatedlast\_modified?: string

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_edit_response%20%3E%20(schema)%20%3E%20(property)%20last_modified">Link to this property</a>

lookback\_hops?: number

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

modified\_at?: string

formatdate-time

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

o365\_tenant\_id?: string| null

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

<details>

<summary>

regions?: Array&lt;"GLOBAL"| "AU"| "DE"| 2 more&gt;

</summary>

One of the following:

"GLOBAL"

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_edit_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_edit_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_edit_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_edit_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_edit_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_edit_response%20%3E%20(schema)%20%3E%20(property)%20regions">Link to this property</a>

require\_tls\_inbound?: boolean| null

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

require\_tls\_outbound?: boolean| null

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

<details>

<summary>

spf\_status?: "none"| "good"| "neutral"| 2 more| null

</summary>

One of the following:

"none"

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_edit_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_edit_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_edit_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_edit_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_edit_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_edit_response%20%3E%20(schema)%20%3E%20(property)%20spf_status">Link to this property</a>

<details>

<summary>

status?: "PENDING"| "ACTIVE"| "FAILED"| "TIMEOUT"| null

</summary>

One of the following:

"PENDING"

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_edit_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_edit_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_edit_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_edit_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_edit_response%20%3E%20(schema)%20%3E%20(property)%20status">Link to this property</a>

transport?: string

<a href="#(resource)%20email_security.settings.domains%20%3E%20(model)%20domain_edit_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_edit_response%20%3E%20(schema)>)

### Update an email domain

TypeScript

HTTPTypeScriptPythonGoTerraform

```
import Cloudflare from 'cloudflare';

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

const response = await client.emailSecurity.settings.domains.edit(
  'f174e90a-fafe-4643-bbbc-4a0ed4fc8415',
  { account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
);

console.log(response.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"
  }
}
```