---
title: Domains
---

[Skip to content](#%5Ftop) 

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

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

Copy Markdown

Open in **Claude**

Open in **ChatGPT**

Open in **Cursor**

---

**Copy Markdown**

**View as Markdown**

# Domains

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

client.workers.domains.list(DomainListParams { account\_id, environment, hostname, 3 more } params, RequestOptionsoptions?): SinglePage<[DomainListResponse](https://developers.cloudflare.com/api/typescript/resources/workers#%28resource%29%20workers.domains%20%3E%20%28model%29%20domain%5Flist%5Fresponse%20%3E%20%28schema%29) { id, cert\_id, hostname, 4 more } \>

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

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

client.workers.domains.get(stringdomainID, DomainGetParams { account\_id } params, RequestOptionsoptions?): [DomainGetResponse](https://developers.cloudflare.com/api/typescript/resources/workers#%28resource%29%20workers.domains%20%3E%20%28model%29%20domain%5Fget%5Fresponse%20%3E%20%28schema%29) { id, cert\_id, hostname, 4 more } 

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

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

client.workers.domains.update(DomainUpdateParams { account\_id, hostname, service, 2 more } params, RequestOptionsoptions?): [DomainUpdateResponse](https://developers.cloudflare.com/api/typescript/resources/workers#%28resource%29%20workers.domains%20%3E%20%28model%29%20domain%5Fupdate%5Fresponse%20%3E%20%28schema%29) { id, cert\_id, hostname, 4 more } 

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

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

client.workers.domains.delete(stringdomainID, DomainDeleteParams { account\_id } params, RequestOptionsoptions?): [DomainDeleteResponse](https://developers.cloudflare.com/api/typescript/resources/workers#%28resource%29%20workers.domains%20%3E%20%28model%29%20domain%5Fdelete%5Fresponse%20%3E%20%28schema%29) { errors, messages, success } 

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

##### ModelsExpand Collapse 

DomainListResponse { id, cert\_id, hostname, 4 more } 

id: string

Immutable ID of the domain.

cert\_id: string

ID of the TLS certificate issued for the domain.

formatuuid

hostname: string

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.

service: string

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

zone\_id: string

ID of the zone containing the domain hostname.

zone\_name: string

Name of the zone containing the domain hostname.

Deprecatedenvironment?: string

Worker environment associated with the domain.

DomainGetResponse { id, cert\_id, hostname, 4 more } 

id: string

Immutable ID of the domain.

cert\_id: string

ID of the TLS certificate issued for the domain.

formatuuid

hostname: string

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.

service: string

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

zone\_id: string

ID of the zone containing the domain hostname.

zone\_name: string

Name of the zone containing the domain hostname.

Deprecatedenvironment?: string

Worker environment associated with the domain.

DomainUpdateResponse { id, cert\_id, hostname, 4 more } 

id: string

Immutable ID of the domain.

cert\_id: string

ID of the TLS certificate issued for the domain.

formatuuid

hostname: string

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.

service: string

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

zone\_id: string

ID of the zone containing the domain hostname.

zone\_name: string

Name of the zone containing the domain hostname.

Deprecatedenvironment?: string

Worker environment associated with the domain.

DomainDeleteResponse { errors, messages, success } 

errors: Array<Error\>

code: number

minimum1000

message: string

documentation\_url?: string

source?: Source { pointer } 

pointer?: string

messages: Array<Message\>

code: number

minimum1000

message: string

documentation\_url?: string

source?: Source { pointer } 

pointer?: string

success: true

Whether the API call was successful.