hosting

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

Change a site's primary domain (asynchronous).

Semua titik akhir hosting

Autentikasi

Kirim kunci API sebagai token bearer. Kunci tersebut harus memiliki izin sites.create; kunci tanpa izin tersebut akan ditolak dengan status 403, bukan 404.

Endpoint ini tidak memerlukan id organisasi. Kunci Anda telah mengidentifikasi organisasi tempatnya berafiliasi, dan respons akan dibatasi untuk organisasi tersebut.

Coba

Ganti apa pun di dalam tanda kurung sudut dengan nilai Anda sendiri, dan placeholder kunci dengan kunci dari dasbor Anda.

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> }'

Sudah masuk? Konsol API di dasbor Anda akan mengisi ID organisasi asli dan kunci Anda sendiri, serta menjalankan permintaan terhadap API langsung sehingga Anda dapat melihat respons aktualnya. Buka titik akhir ini di konsol API

Detail

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.

Parameter

NamaJenisWajibTentang apa ini
siteId (path)UuidYaSite ID (UUIDv7).

Isi permintaan

NamaJenisWajibTentang apa ini
new_domainHostnameYaThe site's new primary domain (FQDN).
keep_old_as_aliasbooleanTidakKeep serving the old domain as an alias of the site after the flip.

Tanggapan

NamaJenisWajibTentang apa ini
site_idUuidYaUUIDv7 identifier — sortable by creation time (docs/02 §8).
new_domainHostnameYaA fully-qualified DNS hostname, lowercase, no trailing dot.
workflow_idstringYaThe Temporal workflow id running the rename saga (deterministic per site).
statusstring<accepted>YaThe saga was accepted; poll the site / `site.*` events for completion.

Kesalahan yang dapat dikembalikan oleh titik akhir ini

401 · 403 · 404 · 409 · 422 · 429 · 503