API reference
sites.domains
List domains for a new Site
GET/api/v1/projects/{projectId}/domains
Details
The domains (active zones) in a Project's Cloudflare account that a new Site can use as its address (sites.create `domain`): the domain itself or one subdomain of it. Read live from Cloudflare; empty when the account has none, and a Site can always use its free workers.dev address instead.
Input
| Field | Type | Notes |
|---|---|---|
projectIdrequired | string |
Output
| Field | Type | Notes |
|---|---|---|
domainsrequired | list of object | |
domains.namerequired | string |