hosting
POST /v1/sites/{siteId}/rename-domain
Change a site's primary domain (asynchronous).
Kimlik Doğrulama
Bearer token olarak bir API anahtarı gönderin. Anahtar sites.create iznine sahip olmalıdır; bu izne sahip olmayan bir anahtar 404 ile değil, 403 ile reddedilir.
Bu uç nokta hiçbir organizasyon kimliği almaz. Anahtarınız zaten ait olduğu organizasyonu tanımlar ve yanıt bu organizasyonla sınırlandırılır.
Dene
Köşeli parantez içindeki her şeyi kendi değerlerinizle ve anahtar yer tutucusunu panonuzdan bir anahtarla değiştirin.
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> }'Oturum açtınız mı? Panonuzdaki API konsolu, gerçek organizasyon kimliğinizi ve kendi anahtarınızı otomatik olarak doldurur ve isteği canlı API üzerinde çalıştırarak gerçek yanıtı görmenizi sağlar. Bu uç noktayı API konsolunda açın
Ayrıntılar
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.
Parametreler
| Ad | Tür | Zorunlu | Ne olduğu |
|---|---|---|---|
siteId (path) | Uuid | Evet | Site ID (UUIDv7). |
İstek gövdesi
| Ad | Tür | Zorunlu | Ne olduğu |
|---|---|---|---|
new_domain | Hostname | Evet | The site's new primary domain (FQDN). |
keep_old_as_alias | boolean | Hayır | Keep serving the old domain as an alias of the site after the flip. |
Yanıt
| Ad | Tür | Zorunlu | Ne olduğu |
|---|---|---|---|
site_id | Uuid | Evet | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
new_domain | Hostname | Evet | A fully-qualified DNS hostname, lowercase, no trailing dot. |
workflow_id | string | Evet | The Temporal workflow id running the rename saga (deterministic per site). |
status | string<accepted> | Evet | The saga was accepted; poll the site / `site.*` events for completion. |
Bu uç noktanın dönderebileceği hatalar
401 · 403 · 404 · 409 · 422 · 429 · 503