Skip to content

Create a hostname in a zone​

POST
/api/zones/{zoneId}/hostnames

Creates a hostname on the zone. The root domain is derived from the hostname name and the matching domain is found or created for the zone's organization (rejected if that domain already belongs to another organization). A unique CNAME target is generated, an initial DNS check is scheduled, and a certificate is bootstrapped for the domain when one is needed. When "cdnEnabled" is true the CDN pull zone is provisioned, and the change takes effect on the live configuration.

Authorizations​

ApiToken

Long-lived API token created via POST /api/api-tokens (returned once in plaintext). A token created with readOnly may only perform safe requests (GET, HEAD, OPTIONS); write requests are rejected on every endpoint.

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
string
Required

Request Body​

JSON
{
  
"name": "www.example.com",
  
"cdnEnabled": false
}

Responses​

hostname resource created

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,
  
"isApex": false
}

Playground​

Authorization
Variables
Key
Value
Body

Samples​

Powered by VitePress OpenAPI