hosting
POST /v1/sites/{siteId}/rename-domain
Change a site's primary domain (asynchronous).
Uwierzytelnianie
Wyślij klucz API jako token bearer. Klucz musi posiadać uprawnienie sites.create; klucz bez niego jest odrzucany z kodem 403, a nie 404.
Ten punkt końcowy nie wymaga identyfikatora organizacji. Twój klucz już identyfikuje organizację, do której należy, a odpowiedź jest do niej ograniczona.
Wypróbuj
Zastąp wszystko w nawiasach ostrych własnymi wartościami, a zastępczy znacznik klucza kluczem ze swojego pulpitu nawigacyjnego.
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> }'Zalogowany? Konsola API w Twoim panelu uzupełnia rzeczywiste identyfikator organizacji oraz Twój własny klucz i wykonuje żądanie względem aktywnego API, dzięki czemu możesz zobaczyć rzeczywistą odpowiedź. Otwórz ten punkt końcowy w konsoli API
Szczegóły
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.
Parametry
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
siteId (path) | Uuid | Tak | Site ID (UUIDv7). |
Treść żądania
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
new_domain | Hostname | Tak | The site's new primary domain (FQDN). |
keep_old_as_alias | boolean | Nie | Keep serving the old domain as an alias of the site after the flip. |
Odpowiedź
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
site_id | Uuid | Tak | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
new_domain | Hostname | Tak | A fully-qualified DNS hostname, lowercase, no trailing dot. |
workflow_id | string | Tak | The Temporal workflow id running the rename saga (deterministic per site). |
status | string<accepted> | Tak | The saga was accepted; poll the site / `site.*` events for completion. |
Błędy, które ten punkt końcowy może zwrócić
401 · 403 · 404 · 409 · 422 · 429 · 503