hosting
POST /v1/sites/{siteId}/rename-domain
Change a site's primary domain (asynchronous).
تصدیقهویت
یو API کی د بیئرر ټوکن (bearer token) په توګه ولیکئ. کی باید د sites.create اجازه ولري؛ له دې اجازې پرته کی د 404 پرځای د 403 په واسطه رد کیږي.
دا پای نقطه د سازمان هېڅ آی ډي نه اخلي. ستاسو کیلي مخکې تر مخکې هغه سازمان په ګوته کوي چې پورې اړه لري، او ځواب ورته محدود دی.
هڅه وکړئ
د انګلیسي په زاوي پنسونو کې هرڅه د خپلو ارزښتونو سره بدل کړئ، او د کلي ځای لرونکی ستاسو د ډشبورډ د کلي سره.
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> }'ننوتي یاست؟ ستاسو په ډشبورډ کې د API کنسول ستاسو د اصلي سازمان ID او ستاسو خپله کیلي ډکوي، او غوښتنه د ژوندی API په وړاندې پرمخ وړي ترڅو تاسو وکولی شئ اصلي ځواب وګورئ. دا پای ټکی (endpoint) د API په کنسول کې پرانیزئ
تفصیلات
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.
پارامترونه
| نوم | ډول | اړین | دا څه شی دی |
|---|---|---|---|
siteId (path) | Uuid | هو | Site ID (UUIDv7). |
د غوښتنې بدن
| نوم | ډول | اړین | دا څه شی دی |
|---|---|---|---|
new_domain | Hostname | هو | The site's new primary domain (FQDN). |
keep_old_as_alias | boolean | نه | Keep serving the old domain as an alias of the site after the flip. |
ځواب
| نوم | ډول | اړین | دا څه شی دی |
|---|---|---|---|
site_id | Uuid | هو | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
new_domain | Hostname | هو | A fully-qualified DNS hostname, lowercase, no trailing dot. |
workflow_id | string | هو | The Temporal workflow id running the rename saga (deterministic per site). |
status | string<accepted> | هو | The saga was accepted; poll the site / `site.*` events for completion. |
تېروتنې چې دا پای ټکی یې بیرته راګرځولی شي
401 · 403 · 404 · 409 · 422 · 429 · 503