hosting

POST /v1/sites/{siteId}/rename-domain

Change a site's primary domain (asynchronous).

Tutti gli endpoint hosting

Autenticazione

Invia una chiave API come token di tipo bearer. La chiave deve disporre dell'autorizzazione sites.create; una chiave sprovvista di tale autorizzazione viene rifiutata con 403 anziché 404.

Questo endpoint non richiede alcun ID organizzazione. La tua chiave identifica già l'organizzazione a cui appartiene e la risposta è limitata ad essa.

Provalo

Sostituisci qualsiasi elemento tra parentesi angolari con i tuoi valori e il segnaposto key con una chiave dalla tua dashboard.

curl -X POST https://api.zinndigital.com/v1/sites/{siteId}/rename-domain \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "new_domain": <Hostname> }'

Hai effettuato l'accesso? La console API nella tua dashboard inserisce il tuo ID organizzazione reale e la tua chiave personale, ed esegue la richiesta sull'API live in modo da poter vedere la risposta effettiva. Apri questo endpoint nella console API

Dettagli

Starts the durable **rename-domain** saga for a site (new-side setup → flip → old-side teardown, register #91). Returns `202 Accepted` immediately — the work runs as a Temporal workflow; poll the site or subscribe to `site.*` events for completion. Requires `sites.create` (the same authority that provisions a site). Idempotent on the site: a repeat call while the saga is running is accepted and does not start a second run.

Parametri

NomeTipoObbligatorioChe cos'è
siteId (path)UuidSite ID (UUIDv7).

Corpo della richiesta

NomeTipoObbligatorioChe cos'è
new_domainHostnameThe site's new primary domain (FQDN).
keep_old_as_aliasbooleanNoKeep serving the old domain as an alias of the site after the flip.

Risposta

NomeTipoObbligatorioChe cos'è
site_idUuidUUIDv7 identifier — sortable by creation time (docs/02 §8).
new_domainHostnameA fully-qualified DNS hostname, lowercase, no trailing dot.
workflow_idstringThe Temporal workflow id running the rename saga (deterministic per site).
statusstring<accepted>The saga was accepted; poll the site / `site.*` events for completion.

Errori che questo endpoint può restituire

401 · 403 · 404 · 409 · 422 · 429 · 503