Skip to content

Reassign a hostname between a zone and a redirect

PATCH
/api/organizations/{organizationId}/hostnames/{id}

Moves a hostname between a zone and a redirect. The two directions are mutually exclusive: send "zone" (an IRI) to attach the hostname to that zone, or send both "reassignRedirectTargetHostname" and "reassignRedirectMode" to create a new redirect in the hostname's organization and attach the hostname to it. Either direction deletes the previous redirect owner if there was one. Zone-to-zone moves are out of scope here and stay on PATCH /zones/{zoneId}/hostnames/{id}. CDN state is re-synced 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).

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
id*

hostname identifier

Type
string
Required

Request Body

application/merge-patch+json
JSON
{
  
"zone": "https://example.com/",
  
"redirect": "https://example.com/",
  
"reassignRedirectTargetHostname": "example.com",
  
"reassignRedirectMode": "path"
}

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
}

Playground

Authorization
Variables
Key
Value
Body

Samples

Powered by VitePress OpenAPI