Hanzo
OpenapiProjects

Checks the DNS challenge for a pending custom hostname and, when it passes,…

Checks the DNS challenge for a pending custom hostname and, when it passes, promotes the host so it begins routing at the edge.

POST /v1/projects/{slug}/domains/{host}/verify

Addresshttps://api.hanzo.ai/v1/projects/{slug}/domains/{host}/verify
MethodPOST
Operationpost_projects_by_slug_domains_by_host_verify
AuthAuthorization: Bearer $HANZO_API_KEY

Checks the DNS challenge for a pending custom hostname and, when it passes, promotes the host so it begins routing at the edge.

It answers 200 either way, with the host's honest current state: verified once the TXT record is found, still pending — with the records to publish and the resolver's own explanation in detail — when it is not. A not-yet is not an error: the check ran, DNS simply has not propagated, and the customer retries. An already-verified host is returned unchanged without re-resolving. On a successful promotion the edge cache-tag is flushed, since the host routes as of that moment.

Scope: a validated principal is required (403 without one). Both the site and the claim are resolved within that principal's org, so a host claimed by another tenant is "not claimed by this site".

Request

2 fields.

FieldInTypeRequiredDescription
slugpathstringyesSlug is the project the host is attached to, from the path.
hostpathstringyesHost is the custom hostname, from the path.

Response

StatusBodyMeaning
200projectsDomainok

200 body — 10 fields.

FieldInTypeAlwaysDescription
createdAtbodyintegerCreatedAt is when the host was claimed, as Unix seconds — not when it went live.
detailbodystringDetail is what is holding the claim up, in words a person can act on.
hostbodystringHost is the custom hostname claimed for this site.
recordsbodyRecord[]Records are EXACTLY the DNS records to publish to prove ownership and route the host.
records[].namebodystringthe record name the customer creates
records[].typebodystringTXT | CNAME
records[].valuebodystringthe record value
statusbodystringStatus is live when the edge answers for this host now, pending while the claim is waiting on DNS proof of ownership.
urlbodystringURL is where the host will serve once it is live — present on a pending claim too, so a console can show the destination before it works.
verifiedbodybooleanVerified is the same fact as a boolean, for a caller that only needs the yes or no.

Failure carries the platform error shape — see Errors.

Examples

hanzo projects domains verify <slug> <host>

Projects API · All Hanzo APIs · Interactive reference

How is this guide?

On this page