hosting

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

Change a site's primary domain (asynchronous).

Wszystkie punkty końcowe hosting

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

NazwaTypWymaganeCo to jest
siteId (path)UuidTakSite ID (UUIDv7).

Treść żądania

NazwaTypWymaganeCo to jest
new_domainHostnameTakThe site's new primary domain (FQDN).
keep_old_as_aliasbooleanNieKeep serving the old domain as an alias of the site after the flip.

Odpowiedź

NazwaTypWymaganeCo to jest
site_idUuidTakUUIDv7 identifier — sortable by creation time (docs/02 §8).
new_domainHostnameTakA fully-qualified DNS hostname, lowercase, no trailing dot.
workflow_idstringTakThe Temporal workflow id running the rename saga (deterministic per site).
statusstring<accepted>TakThe 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