hosting
POST /v1/sites/{siteId}/rename-domain
Change a site's primary domain (asynchronous).
Autentifikacija
Pošaljite API ključ kao bearer token. Ključ mora imati dozvolu sites.create; ključ bez nje se odbija sa 403, a ne sa 404.
Ovaj krajnji tačka ne prihvata ID organizacije. Vaš ključ već identifikuje organizaciju kojoj pripada, a odgovor je ograničen na nju.
Isprobajte
Zamenite bilo šta u uglastim zagradama sopstvenim vrednostima, a ključni placeholder sa ključem sa vaše kontrolne table.
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> }'Prijavljeni ste? API konzola na vašoj kontrolnoj tabli automatski popunjava ID vaše stvarne organizacije i vaš sopstveni ključ, i izvršava zahtev nad API-jem uživo tako da možete videti stvarni odgovor. Otvorite ovu krajnju tačku u API konzoli
Detalji
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
| Naziv | Vrsta | Obavezno | Šta je ovo |
|---|---|---|---|
siteId (path) | Uuid | Da | Site ID (UUIDv7). |
Telo zahteva
| Naziv | Vrsta | Obavezno | Šta je ovo |
|---|---|---|---|
new_domain | Hostname | Da | The site's new primary domain (FQDN). |
keep_old_as_alias | boolean | Ne | Keep serving the old domain as an alias of the site after the flip. |
Odgovor
| Naziv | Vrsta | Obavezno | Šta je ovo |
|---|---|---|---|
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. |
Greške koje ovaj krajnji tačka može da vrati
401 · 403 · 404 · 409 · 422 · 429 · 503