Hanzo
OpenapiCloudflare

Attaches a custom domain to a Cloudflare Pages project.

Attaches a custom domain to a Cloudflare Pages project.

POST /v1/cloudflare/pages/projects/{project}/domains

Addresshttps://api.hanzo.ai/v1/cloudflare/pages/projects/{project}/domains
MethodPOST
Operationpost_cloudflare_pages_projects_by_project_domains
AuthAuthorization: Bearer $HANZO_API_KEY

Attaches a custom domain to a Cloudflare Pages project. Requires org admin. Cloudflare owns validation and certificate issuance from here on.

Request

3 fields, body application/json (required).

FieldInTypeRequiredDescription
projectpathstringyesProject is the Pages project name, from the path.
namebodystringName is the custom domain to attach, e.g.
projectbodystringProject is the Pages project name, from the path.

Response

StatusBodyMeaning
200ok

200 body — 1 field.

FieldInTypeAlwaysDescription
(body)bodyanyyes

Failure carries the platform error shape — see Errors.

Examples

hanzo cloudflare pages projects domains create <project>

Cloudflare API · All Hanzo APIs · Interactive reference

How is this guide?

On this page