Update a hostname in a zone
PATCH
/api/zones/{zoneId}/hostnames/{id}
Updates the hostname's writable fields - "cdnEnabled", and "zone" for zone-to-zone moves. Toggling CDN or moving the hostname to another zone re-syncs the CDN pull zone, and a rename or move takes effect on the live configuration. CDN changes are applied together with the save so stored state never claims a CDN status the CDN did not apply.
Authorizations
ApiToken
Long-lived API token created via POST /api/api-tokens (returned once in plaintext).
Type
API Key (header: X-API-TOKEN)
or
JWT
JWT access token obtained via POST /api/auth/login. Send as: Authorization: Bearer
Type
HTTP (bearer)
Parameters
Path Parameters
zoneId*
Zone identifier
Type
Requiredstring
id*
hostname identifier
Type
Requiredstring
Request Body
application/merge-patch+json
JSON "zone": "https://example.com/", "cdnEnabled": false
{
}
Responses
hostname resource updated
JSON "@context": "string", "@id": "string", "@type": "string", "id": "9f1b2c3d-4e5f-6789-abcd-ef0123456789", "domain": "https://example.com/", "zone": "https://example.com/", "redirect": "https://example.com/", "name": "www.example.com", "cnameTarget": "string", "cdnEnabled": false, "dnsTargetStatus": "pending", "dnsObservedValue": "string", "dnsLastCheckedAt": "2026-07-01T12:00:00+00:00", "createdAt": "2026-07-01T12:00:00+00:00", "updatedAt": "2026-07-01T12:00:00+00:00", "sharedCertificate": false
{
}
