hosting

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

Change a site's primary domain (asynchronous).

Toate punctele finale hosting

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

NumeTipObligatoriuCe este
siteId (path)UuidDaSite ID (UUIDv7).

Corp cerere

NumeTipObligatoriuCe este
new_domainHostnameDaThe site's new primary domain (FQDN).
keep_old_as_aliasbooleanNuKeep serving the old domain as an alias of the site after the flip.

Răspuns

NumeTipObligatoriuCe este
site_idUuidDaUUIDv7 identifier — sortable by creation time (docs/02 §8).
new_domainHostnameDaA fully-qualified DNS hostname, lowercase, no trailing dot.
workflow_idstringDaThe Temporal workflow id running the rename saga (deterministic per site).
statusstring<accepted>DaThe 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