hosting

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

Change a site's primary domain (asynchronous).

Bütün hosting nöqtələri

Doğrulama

API açarını bearer token kimi göndərin. Açar sites.create icazəsinə malik olmalıdır; bu icazəsi olmayan açar 404 deyil, 403 xətası ilə rədd edilir.

Bu endpoint heç bir təşkilat ID-si tələb etmir. Sizin açarınız artıq aid olduğu təşkilatı müəyyən edir və cavab həmin təşkilat üçün məhdudlaşdırılır.

Sınaqdan keçir

Bucaqlı mötərizələrdə olan hór şeyi öz qiymətlərinizlə, açar yertutucusunu isə idarə panelinizdən bir açarla əvəz edin.

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

Sistemə daxil olmusunuz? İdarə panelinizdəki API konsolu real təşkilatınızın identifikatorunu və öz açarınızı avtomatik doldurur, sorğunu canlı API-yə qarşı icra edir ki, siz faktiki cavabı görə biləsiniz. Bu son nöqtəni API konsolunda açın

Təfərrüatlar

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.

Parametrlər

AdTipTələb olunurNədir
siteId (path)UuidBəliSite ID (UUIDv7).

Sorğu gövdəsi

AdTipTələb olunurNədir
new_domainHostnameBəliThe site's new primary domain (FQDN).
keep_old_as_aliasbooleanXeyrKeep serving the old domain as an alias of the site after the flip.

Cavab

AdTipTələb olunurNədir
site_idUuidBəliUUIDv7 identifier — sortable by creation time (docs/02 §8).
new_domainHostnameBəliA fully-qualified DNS hostname, lowercase, no trailing dot.
workflow_idstringBəliThe Temporal workflow id running the rename saga (deterministic per site).
statusstring<accepted>BəliThe saga was accepted; poll the site / `site.*` events for completion.

Bu son nöqtənin qaytara biləcəyi xətalar

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