---
title: Subdomains
---

[Skip to content](#_top)

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

[Email Sending](https://developers.cloudflare.com/api/python/resources/email_sending)

Copy Markdown

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

---

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

# Subdomains

##### [List sending subdomains](https://developers.cloudflare.com/api/python/resources/email_sending/subresources/subdomains/methods/list)

email\_sending.subdomains.list(SubdomainListParams\*\*kwargs) -> SyncSinglePage\[[SubdomainListResponse](<https://developers.cloudflare.com/api/python/resources/email_sending#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_list_response%20%3E%20(schema)>)]

GET/zones/{zone\_id}/email/sending/subdomains

##### [Get a sending subdomain](https://developers.cloudflare.com/api/python/resources/email_sending/subresources/subdomains/methods/get)

email\_sending.subdomains.get(strsubdomain\_id, SubdomainGetParams\*\*kwargs) -> [SubdomainGetResponse](<https://developers.cloudflare.com/api/python/resources/email_sending#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_get_response%20%3E%20(schema)>)

GET/zones/{zone\_id}/email/sending/subdomains/{subdomain\_id}

##### [Create a sending subdomain](https://developers.cloudflare.com/api/python/resources/email_sending/subresources/subdomains/methods/create)

email\_sending.subdomains.create(SubdomainCreateParams\*\*kwargs) -> [SubdomainCreateResponse](<https://developers.cloudflare.com/api/python/resources/email_sending#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_create_response%20%3E%20(schema)>)

POST/zones/{zone\_id}/email/sending/subdomains

##### [Update a sending subdomain](https://developers.cloudflare.com/api/python/resources/email_sending/subresources/subdomains/methods/edit)

email\_sending.subdomains.edit(strsubdomain\_id, SubdomainEditParams\*\*kwargs) -> [SubdomainEditResponse](<https://developers.cloudflare.com/api/python/resources/email_sending#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_edit_response%20%3E%20(schema)>)

PATCH/zones/{zone\_id}/email/sending/subdomains/{subdomain\_id}

##### [Delete a sending subdomain](https://developers.cloudflare.com/api/python/resources/email_sending/subresources/subdomains/methods/delete)

email\_sending.subdomains.delete(strsubdomain\_id, SubdomainDeleteParams\*\*kwargs) -> [SubdomainDeleteResponse](<https://developers.cloudflare.com/api/python/resources/email_sending#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_delete_response%20%3E%20(schema)>)

DELETE/zones/{zone\_id}/email/sending/subdomains/{subdomain\_id}

##### ModelsExpand Collapse

<details>

<summary>

class SubdomainListResponse: …

</summary>

enabled: bool

Whether Email Sending is enabled on this subdomain.

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_list_response%20%3E%20(schema)%20%3E%20(property)%20enabled">Link to this property</a>

name: str

The exact domain name or a leftmost wildcard such as <code>*.example.com</code>.

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_list_response%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

tag: str

Sending subdomain identifier.

maxLength32

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_list_response%20%3E%20(schema)%20%3E%20(property)%20tag">Link to this property</a>

created: Optional\[datetime]

The date and time the destination address has been created.

formatdate-time

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_list_response%20%3E%20(schema)%20%3E%20(property)%20created">Link to this property</a>

dkim\_selector: Optional\[str]

The DKIM selector used for email signing. Wildcard rows publish the selector and sign with <code>d=&lt;base&gt;</code>.

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_list_response%20%3E%20(schema)%20%3E%20(property)%20dkim_selector">Link to this property</a>

drop\_suppressed\_recipients: Optional\[bool]

Whether a send request that includes a recipient suppressed on this subdomain drops that recipient and still delivers to the rest, instead of failing the entire request.

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_list_response%20%3E%20(schema)%20%3E%20(property)%20drop_suppressed_recipients">Link to this property</a>

modified: Optional\[datetime]

The date and time the destination address was last modified.

formatdate-time

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_list_response%20%3E%20(schema)%20%3E%20(property)%20modified">Link to this property</a>

preview\_enabled: Optional\[bool]

Whether sent messages from this subdomain can be previewed in the activity log.

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_list_response%20%3E%20(schema)%20%3E%20(property)%20preview_enabled">Link to this property</a>

return\_path\_domain: Optional\[str]

The return-path domain used for bounce handling. Wildcard rows use <code>cf-bounce.&lt;base&gt;</code>.

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_list_response%20%3E%20(schema)%20%3E%20(property)%20return_path_domain">Link to this property</a>

</details>

[Link to this property](<#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_list_response%20%3E%20(schema)>)

<details>

<summary>

class SubdomainGetResponse: …

</summary>

enabled: bool

Whether Email Sending is enabled on this subdomain.

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_get_response%20%3E%20(schema)%20%3E%20(property)%20enabled">Link to this property</a>

name: str

The exact domain name or a leftmost wildcard such as <code>*.example.com</code>.

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_get_response%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

tag: str

Sending subdomain identifier.

maxLength32

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_get_response%20%3E%20(schema)%20%3E%20(property)%20tag">Link to this property</a>

created: Optional\[datetime]

The date and time the destination address has been created.

formatdate-time

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_get_response%20%3E%20(schema)%20%3E%20(property)%20created">Link to this property</a>

dkim\_selector: Optional\[str]

The DKIM selector used for email signing. Wildcard rows publish the selector and sign with <code>d=&lt;base&gt;</code>.

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_get_response%20%3E%20(schema)%20%3E%20(property)%20dkim_selector">Link to this property</a>

drop\_suppressed\_recipients: Optional\[bool]

Whether a send request that includes a recipient suppressed on this subdomain drops that recipient and still delivers to the rest, instead of failing the entire request.

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_get_response%20%3E%20(schema)%20%3E%20(property)%20drop_suppressed_recipients">Link to this property</a>

modified: Optional\[datetime]

The date and time the destination address was last modified.

formatdate-time

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_get_response%20%3E%20(schema)%20%3E%20(property)%20modified">Link to this property</a>

preview\_enabled: Optional\[bool]

Whether sent messages from this subdomain can be previewed in the activity log.

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_get_response%20%3E%20(schema)%20%3E%20(property)%20preview_enabled">Link to this property</a>

return\_path\_domain: Optional\[str]

The return-path domain used for bounce handling. Wildcard rows use <code>cf-bounce.&lt;base&gt;</code>.

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_get_response%20%3E%20(schema)%20%3E%20(property)%20return_path_domain">Link to this property</a>

</details>

[Link to this property](<#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_get_response%20%3E%20(schema)>)

<details>

<summary>

class SubdomainCreateResponse: …

</summary>

enabled: bool

Whether Email Sending is enabled on this subdomain.

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_create_response%20%3E%20(schema)%20%3E%20(property)%20enabled">Link to this property</a>

name: str

The exact domain name or a leftmost wildcard such as <code>*.example.com</code>.

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_create_response%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

tag: str

Sending subdomain identifier.

maxLength32

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_create_response%20%3E%20(schema)%20%3E%20(property)%20tag">Link to this property</a>

created: Optional\[datetime]

The date and time the destination address has been created.

formatdate-time

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_create_response%20%3E%20(schema)%20%3E%20(property)%20created">Link to this property</a>

dkim\_selector: Optional\[str]

The DKIM selector used for email signing. Wildcard rows publish the selector and sign with <code>d=&lt;base&gt;</code>.

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_create_response%20%3E%20(schema)%20%3E%20(property)%20dkim_selector">Link to this property</a>

drop\_suppressed\_recipients: Optional\[bool]

Whether a send request that includes a recipient suppressed on this subdomain drops that recipient and still delivers to the rest, instead of failing the entire request.

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_create_response%20%3E%20(schema)%20%3E%20(property)%20drop_suppressed_recipients">Link to this property</a>

modified: Optional\[datetime]

The date and time the destination address was last modified.

formatdate-time

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_create_response%20%3E%20(schema)%20%3E%20(property)%20modified">Link to this property</a>

preview\_enabled: Optional\[bool]

Whether sent messages from this subdomain can be previewed in the activity log.

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_create_response%20%3E%20(schema)%20%3E%20(property)%20preview_enabled">Link to this property</a>

return\_path\_domain: Optional\[str]

The return-path domain used for bounce handling. Wildcard rows use <code>cf-bounce.&lt;base&gt;</code>.

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_create_response%20%3E%20(schema)%20%3E%20(property)%20return_path_domain">Link to this property</a>

</details>

[Link to this property](<#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_create_response%20%3E%20(schema)>)

<details>

<summary>

class SubdomainEditResponse: …

</summary>

enabled: bool

Whether Email Sending is enabled on this subdomain.

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_edit_response%20%3E%20(schema)%20%3E%20(property)%20enabled">Link to this property</a>

name: str

The exact domain name or a leftmost wildcard such as <code>*.example.com</code>.

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_edit_response%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

tag: str

Sending subdomain identifier.

maxLength32

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_edit_response%20%3E%20(schema)%20%3E%20(property)%20tag">Link to this property</a>

created: Optional\[datetime]

The date and time the destination address has been created.

formatdate-time

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_edit_response%20%3E%20(schema)%20%3E%20(property)%20created">Link to this property</a>

dkim\_selector: Optional\[str]

The DKIM selector used for email signing. Wildcard rows publish the selector and sign with <code>d=&lt;base&gt;</code>.

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_edit_response%20%3E%20(schema)%20%3E%20(property)%20dkim_selector">Link to this property</a>

drop\_suppressed\_recipients: Optional\[bool]

Whether a send request that includes a recipient suppressed on this subdomain drops that recipient and still delivers to the rest, instead of failing the entire request.

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_edit_response%20%3E%20(schema)%20%3E%20(property)%20drop_suppressed_recipients">Link to this property</a>

modified: Optional\[datetime]

The date and time the destination address was last modified.

formatdate-time

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_edit_response%20%3E%20(schema)%20%3E%20(property)%20modified">Link to this property</a>

preview\_enabled: Optional\[bool]

Whether sent messages from this subdomain can be previewed in the activity log.

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_edit_response%20%3E%20(schema)%20%3E%20(property)%20preview_enabled">Link to this property</a>

return\_path\_domain: Optional\[str]

The return-path domain used for bounce handling. Wildcard rows use <code>cf-bounce.&lt;base&gt;</code>.

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_edit_response%20%3E%20(schema)%20%3E%20(property)%20return_path_domain">Link to this property</a>

</details>

[Link to this property](<#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_edit_response%20%3E%20(schema)>)

<details>

<summary>

class SubdomainDeleteResponse: …

</summary>

<details>

<summary>

errors: List\[Error]

</summary>

code: int

minimum1000

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_delete_response%20%3E%20(schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20code">Link to this property</a>

message: str

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_delete_response%20%3E%20(schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20message">Link to this property</a>

documentation\_url: Optional\[str]

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_delete_response%20%3E%20(schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20documentation_url">Link to this property</a>

<details>

<summary>

source: Optional\[ErrorSource]

</summary>

pointer: Optional\[str]

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_delete_response%20%3E%20(schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20source%20%3E%20(property)%20pointer">Link to this property</a>

</details>

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_delete_response%20%3E%20(schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20source">Link to this property</a>

</details>

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_delete_response%20%3E%20(schema)%20%3E%20(property)%20errors">Link to this property</a>

<details>

<summary>

messages: List\[Message]

</summary>

code: int

minimum1000

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_delete_response%20%3E%20(schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20code">Link to this property</a>

message: str

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_delete_response%20%3E%20(schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20message">Link to this property</a>

documentation\_url: Optional\[str]

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_delete_response%20%3E%20(schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20documentation_url">Link to this property</a>

<details>

<summary>

source: Optional\[MessageSource]

</summary>

pointer: Optional\[str]

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_delete_response%20%3E%20(schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20source%20%3E%20(property)%20pointer">Link to this property</a>

</details>

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_delete_response%20%3E%20(schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20source">Link to this property</a>

</details>

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_delete_response%20%3E%20(schema)%20%3E%20(property)%20messages">Link to this property</a>

success: Literal\[true]

Whether the API call was successful.

<a href="#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_delete_response%20%3E%20(schema)%20%3E%20(property)%20success">Link to this property</a>

</details>

[Link to this property](<#(resource)%20email_sending.subdomains%20%3E%20(model)%20subdomain_delete_response%20%3E%20(schema)>)

#### SubdomainsDNS

##### [Get sending subdomain DNS records](https://developers.cloudflare.com/api/python/resources/email_sending/subresources/subdomains/subresources/dns/methods/get)

email\_sending.subdomains.dns.get(strsubdomain\_id, DNSGetParams\*\*kwargs) -> SyncSinglePage\[[DNSRecord](<https://developers.cloudflare.com/api/python/resources/email_routing#(resource)%20email_routing.dns%20%3E%20(model)%20dns_record%20%3E%20(schema)>)]

GET/zones/{zone\_id}/email/sending/subdomains/{subdomain\_id}/dns