hosting
POST /v1/sites/{siteId}/rename-domain
Change a site's primary domain (asynchronous).
Autentificare
Trimiteți o cheie API ca token de tip bearer. Cheia trebuie să aibă permisiunea sites.create; o cheie care nu o are va fi respinsă cu 403, nu 404.
Acest endpoint nu necesită un ID de organizație. Cheia ta identifică deja organizația căreia îi aparține, iar răspunsul este limitat la aceasta.
Încearcă
Înlocuiți tot ce se află între paranteze unghiulare cu propriile valori și substituentul cheie cu o cheie din tabloul de bord.
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> }'Autentificat? Consola API din panoul de control îți completează ID-ul real al organizației și propria cheie și rulează cererea în API-ul live, astfel încât să poți vedea răspunsul efectiv. Deschideți acest punct final în consola API
Detalii
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
| Nume | Tip | Obligatoriu | Ce este |
|---|---|---|---|
siteId (path) | Uuid | Da | Site ID (UUIDv7). |
Corp cerere
| Nume | Tip | Obligatoriu | Ce este |
|---|---|---|---|
new_domain | Hostname | Da | The site's new primary domain (FQDN). |
keep_old_as_alias | boolean | Nu | Keep serving the old domain as an alias of the site after the flip. |
Răspuns
| Nume | Tip | Obligatoriu | Ce este |
|---|---|---|---|
site_id | Uuid | Da | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
new_domain | Hostname | Da | A fully-qualified DNS hostname, lowercase, no trailing dot. |
workflow_id | string | Da | The Temporal workflow id running the rename saga (deterministic per site). |
status | string<accepted> | Da | The saga was accepted; poll the site / `site.*` events for completion. |
Erori pe care le poate returna acest punct final
401 · 403 · 404 · 409 · 422 · 429 · 503