Skip to content

Create a domain

POST
/api/organizations/{organizationId}/domains

Creates a domain in the organization. The name must be an apex (root) domain - subdomains such as "sub.example.com" are rejected. Domain names are globally unique, so a name already in use by any organization is rejected with 422. The domain is created without managed DNS; enable it afterwards with the update (PATCH) operation to provision managed DNS.

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

organizationId*

Organization identifier

Type
string
Required

Request Body

JSON
{
  
"name": "example.com"
}

Responses

domain resource created

JSON
{
  
"@context": "string",
  
"@id": "string",
  
"@type": "string",
  
"id": "0193b6c2-8f1a-7c3d-9e2b-1a2b3c4d5e6f",
  
"name": "example.com",
  
"shared": false,
  
"dnsEnabled": true,
  
"dnsStatus": "active",
  
"dnsRecordCount": 12,
  
"createdAt": "2026-01-15T09:30:00+00:00",
  
"updatedAt": "2026-01-16T12:00:00+00:00"
}

Playground

Authorization
Variables
Key
Value
Body

Samples

Powered by VitePress OpenAPI