domains
Creates, updates, deletes, gets or lists a domains resource.
Overview
| Name | domains |
| Type | Resource |
| Id | cloudflare.email_security.domains |
Fields
The following fields are returned by SELECT queries:
- get
- list
Domain details
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | Domain identifier (example: f174e90a-fafe-4643-bbbc-4a0ed4fc8415) |
integration_id | string (uuid) | |
o365_tenant_id | string | |
allowed_delivery_modes | array | |
authorization | object | |
created_at | string (date-time) | (example: 2014-01-01T05:20:00.12345Z) |
dmarc_status | string | (none, good, invalid) |
domain | string | (example: example.com) |
drop_dispositions | array | |
emails_processed | object | |
folder | string | (AllItems, Inbox) |
inbox_provider | string | (Microsoft, Google, ) |
ip_restrictions | array | |
last_modified | string (date-time) | Deprecated, use modified_at instead. End of life: November 1, 2026. (example: 2014-01-01T05:20:00.12345Z) |
lookback_hops | integer | |
modified_at | string (date-time) | (example: 2014-01-01T05:20:00.12345Z) |
regions | array | |
require_tls_inbound | boolean | |
require_tls_outbound | boolean | |
spf_status | string | (none, good, neutral, open, invalid) |
status | string | (pending, active, failed, timeout) |
transport | string |
List of domains
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | Domain identifier (example: f174e90a-fafe-4643-bbbc-4a0ed4fc8415) |
integration_id | string (uuid) | |
o365_tenant_id | string | |
allowed_delivery_modes | array | |
authorization | object | |
created_at | string (date-time) | (example: 2014-01-01T05:20:00.12345Z) |
dmarc_status | string | (none, good, invalid) |
domain | string | (example: example.com) |
drop_dispositions | array | |
emails_processed | object | |
folder | string | (AllItems, Inbox) |
inbox_provider | string | (Microsoft, Google, ) |
ip_restrictions | array | |
last_modified | string (date-time) | Deprecated, use modified_at instead. End of life: November 1, 2026. (example: 2014-01-01T05:20:00.12345Z) |
lookback_hops | integer | |
modified_at | string (date-time) | (example: 2014-01-01T05:20:00.12345Z) |
regions | array | |
require_tls_inbound | boolean | |
require_tls_outbound | boolean | |
spf_status | string | (none, good, neutral, open, invalid) |
status | string | (pending, active, failed, timeout) |
transport | string |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | account_id, domain_id | Retrieves detailed information for a specific protected email domain including its delivery configuration, SPF/DMARC status, and authorization state. | |
list | select | account_id | page, per_page, search, order, direction, allowed_delivery_mode, domain, active_delivery_mode, integration_id, status | Returns a paginated list of email domains protected by Email Security. Includes domain configuration, delivery modes, and authorization status. Supports filtering by delivery mode and integration ID. |
edit | update | account_id, domain_id | Updates configuration for a protected email domain. Only provided fields will be modified. Changes affect delivery mode, security settings, and regional processing. | |
delete | delete | account_id, domain_id | Removes email security protection from a domain. After deletion, emails for this domain will no longer be processed by Email Security. This action cannot be undone. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
account_id | string | The Cloudflare account ID. |
domain_id | string (uuid) | |
active_delivery_mode | string | Currently active delivery mode to filter by. |
allowed_delivery_mode | string | Delivery mode to filter by. |
direction | string | The sorting direction. |
domain | array | Domain names to filter by. |
integration_id | string (uuid) | Integration ID to filter by. |
order | string | Field to sort by. |
page | integer | Current page within paginated list of results. |
per_page | integer | The number of results per page. Maximum value is 1000. |
search | string | Search term for filtering records. Behavior may change. |
status | string | Filters response to domains with the provided status. |
SELECT examples
- get
- list
Retrieves detailed information for a specific protected email domain including its delivery configuration, SPF/DMARC status, and authorization state.
SELECT
id,
integration_id,
o365_tenant_id,
allowed_delivery_modes,
authorization,
created_at,
dmarc_status,
domain,
drop_dispositions,
emails_processed,
folder,
inbox_provider,
ip_restrictions,
last_modified,
lookback_hops,
modified_at,
regions,
require_tls_inbound,
require_tls_outbound,
spf_status,
status,
transport
FROM cloudflare.email_security.domains
WHERE account_id = '{{ account_id }}' -- required
AND domain_id = '{{ domain_id }}' -- required
;
Returns a paginated list of email domains protected by Email Security. Includes domain configuration, delivery modes, and authorization status. Supports filtering by delivery mode and integration ID.
SELECT
id,
integration_id,
o365_tenant_id,
allowed_delivery_modes,
authorization,
created_at,
dmarc_status,
domain,
drop_dispositions,
emails_processed,
folder,
inbox_provider,
ip_restrictions,
last_modified,
lookback_hops,
modified_at,
regions,
require_tls_inbound,
require_tls_outbound,
spf_status,
status,
transport
FROM cloudflare.email_security.domains
WHERE account_id = '{{ account_id }}' -- required
AND page = '{{ page }}'
AND per_page = '{{ per_page }}'
AND search = '{{ search }}'
AND order = '{{ order }}'
AND direction = '{{ direction }}'
AND allowed_delivery_mode = '{{ allowed_delivery_mode }}'
AND domain = '{{ domain }}'
AND active_delivery_mode = '{{ active_delivery_mode }}'
AND integration_id = '{{ integration_id }}'
AND status = '{{ status }}'
;
UPDATE examples
- edit
Updates configuration for a protected email domain. Only provided fields will be modified. Changes affect delivery mode, security settings, and regional processing.
UPDATE cloudflare.email_security.domains
SET
allowed_delivery_modes = '{{ allowed_delivery_modes }}',
domain = '{{ domain }}',
drop_dispositions = '{{ drop_dispositions }}',
folder = '{{ folder }}',
integration_id = '{{ integration_id }}',
ip_restrictions = '{{ ip_restrictions }}',
lookback_hops = {{ lookback_hops }},
regions = '{{ regions }}',
require_tls_inbound = {{ require_tls_inbound }},
require_tls_outbound = {{ require_tls_outbound }},
transport = '{{ transport }}'
WHERE
account_id = '{{ account_id }}' --required
AND domain_id = '{{ domain_id }}' --required
RETURNING
errors,
messages,
result,
success;
DELETE examples
- delete
Removes email security protection from a domain. After deletion, emails for this domain will no longer be processed by Email Security. This action cannot be undone.
DELETE FROM cloudflare.email_security.domains
WHERE account_id = '{{ account_id }}' --required
AND domain_id = '{{ domain_id }}' --required
;