---
title: Domains
---

[Skip to content](#_top)

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

[Workers](https://developers.cloudflare.com/api/python/resources/workers)

Copy Markdown

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

---

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

# Domains

##### [List Worker Domains](https://developers.cloudflare.com/api/python/resources/workers/subresources/domains/methods/list)

workers.domains.list(DomainListParams\*\*kwargs) -> SyncSinglePage\[[DomainListResponse](<https://developers.cloudflare.com/api/python/resources/workers#(resource)%20workers.domains%20%3E%20(model)%20domain_list_response%20%3E%20(schema)>)]

GET/accounts/{account\_id}/workers/domains

##### [Get Worker Domain](https://developers.cloudflare.com/api/python/resources/workers/subresources/domains/methods/get)

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

GET/accounts/{account\_id}/workers/domains/{domain\_id}

##### [Attach Worker Domain](https://developers.cloudflare.com/api/python/resources/workers/subresources/domains/methods/update)

workers.domains.update(DomainUpdateParams\*\*kwargs) -> [DomainUpdateResponse](<https://developers.cloudflare.com/api/python/resources/workers#(resource)%20workers.domains%20%3E%20(model)%20domain_update_response%20%3E%20(schema)>)

PUT/accounts/{account\_id}/workers/domains

##### [Detach Worker Domain](https://developers.cloudflare.com/api/python/resources/workers/subresources/domains/methods/delete)

workers.domains.delete(strdomain\_id, DomainDeleteParams\*\*kwargs) -> [DomainDeleteResponse](<https://developers.cloudflare.com/api/python/resources/workers#(resource)%20workers.domains%20%3E%20(model)%20domain_delete_response%20%3E%20(schema)>)

DELETE/accounts/{account\_id}/workers/domains/{domain\_id}

##### ModelsExpand Collapse

<details>

<summary>

class DomainListResponse: …

</summary>

id: str

Immutable ID of the domain.

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

cert\_id: str

ID of the TLS certificate issued for the domain.

formatuuid

<a href="#(resource)%20workers.domains%20%3E%20(model)%20domain_list_response%20%3E%20(schema)%20%3E%20(property)%20cert_id">Link to this property</a>

Deprecatedenvironment: str

Worker environment associated with the domain.

<a href="#(resource)%20workers.domains%20%3E%20(model)%20domain_list_response%20%3E%20(schema)%20%3E%20(property)%20environment">Link to this property</a>

hostname: str

Hostname of the domain. Can be either the zone apex or a subdomain of the zone. Requests to this hostname will be routed to the configured Worker.

<a href="#(resource)%20workers.domains%20%3E%20(model)%20domain_list_response%20%3E%20(schema)%20%3E%20(property)%20hostname">Link to this property</a>

service: str

Name of the Worker associated with the domain. Requests to the configured hostname will be routed to this Worker.

<a href="#(resource)%20workers.domains%20%3E%20(model)%20domain_list_response%20%3E%20(schema)%20%3E%20(property)%20service">Link to this property</a>

zone\_id: str

ID of the zone containing the domain hostname.

<a href="#(resource)%20workers.domains%20%3E%20(model)%20domain_list_response%20%3E%20(schema)%20%3E%20(property)%20zone_id">Link to this property</a>

zone\_name: str

Name of the zone containing the domain hostname.

<a href="#(resource)%20workers.domains%20%3E%20(model)%20domain_list_response%20%3E%20(schema)%20%3E%20(property)%20zone_name">Link to this property</a>

</details>

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

<details>

<summary>

class DomainGetResponse: …

</summary>

id: str

Immutable ID of the domain.

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

cert\_id: str

ID of the TLS certificate issued for the domain.

formatuuid

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

Deprecatedenvironment: str

Worker environment associated with the domain.

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

hostname: str

Hostname of the domain. Can be either the zone apex or a subdomain of the zone. Requests to this hostname will be routed to the configured Worker.

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

service: str

Name of the Worker associated with the domain. Requests to the configured hostname will be routed to this Worker.

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

zone\_id: str

ID of the zone containing the domain hostname.

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

zone\_name: str

Name of the zone containing the domain hostname.

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

</details>

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

<details>

<summary>

class DomainUpdateResponse: …

</summary>

id: str

Immutable ID of the domain.

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

cert\_id: str

ID of the TLS certificate issued for the domain.

formatuuid

<a href="#(resource)%20workers.domains%20%3E%20(model)%20domain_update_response%20%3E%20(schema)%20%3E%20(property)%20cert_id">Link to this property</a>

Deprecatedenvironment: str

Worker environment associated with the domain.

<a href="#(resource)%20workers.domains%20%3E%20(model)%20domain_update_response%20%3E%20(schema)%20%3E%20(property)%20environment">Link to this property</a>

hostname: str

Hostname of the domain. Can be either the zone apex or a subdomain of the zone. Requests to this hostname will be routed to the configured Worker.

<a href="#(resource)%20workers.domains%20%3E%20(model)%20domain_update_response%20%3E%20(schema)%20%3E%20(property)%20hostname">Link to this property</a>

service: str

Name of the Worker associated with the domain. Requests to the configured hostname will be routed to this Worker.

<a href="#(resource)%20workers.domains%20%3E%20(model)%20domain_update_response%20%3E%20(schema)%20%3E%20(property)%20service">Link to this property</a>

zone\_id: str

ID of the zone containing the domain hostname.

<a href="#(resource)%20workers.domains%20%3E%20(model)%20domain_update_response%20%3E%20(schema)%20%3E%20(property)%20zone_id">Link to this property</a>

zone\_name: str

Name of the zone containing the domain hostname.

<a href="#(resource)%20workers.domains%20%3E%20(model)%20domain_update_response%20%3E%20(schema)%20%3E%20(property)%20zone_name">Link to this property</a>

</details>

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

<details>

<summary>

class DomainDeleteResponse: …

</summary>

<details>

<summary>

errors: List\[Error]

</summary>

code: int

minimum1000

<a href="#(resource)%20workers.domains%20%3E%20(model)%20domain_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)%20workers.domains%20%3E%20(model)%20domain_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)%20workers.domains%20%3E%20(model)%20domain_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)%20workers.domains%20%3E%20(model)%20domain_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)%20workers.domains%20%3E%20(model)%20domain_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)%20workers.domains%20%3E%20(model)%20domain_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)%20workers.domains%20%3E%20(model)%20domain_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)%20workers.domains%20%3E%20(model)%20domain_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)%20workers.domains%20%3E%20(model)%20domain_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)%20workers.domains%20%3E%20(model)%20domain_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)%20workers.domains%20%3E%20(model)%20domain_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)%20workers.domains%20%3E%20(model)%20domain_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)%20workers.domains%20%3E%20(model)%20domain_delete_response%20%3E%20(schema)%20%3E%20(property)%20success">Link to this property</a>

</details>

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