hosting
POST /v1/sites/{siteId}/rename-domain
Change a site's primary domain (asynchronous).
المصادقة
أرسل مفتاح واجهة برمجة التطبيقات (API key) كرمز حامل (bearer token). يجب أن يحمل المفتاح إذن sites.create؛ والمفتاح الذي لا يملكه يُرفض بالرمز 403 وليس 404.
لا يقبل هذا الطرف أي معرف للمؤسسة. يحدد مفتاحك بالفعل المؤسسة التي ينتمي إليها، وتكون الاستجابة محصورة في نطاقها.
جربه الآن
استبدل أي شيء بين أقواس زاوية بقيمك الخاصة، والعنصر النائب للمفتاح بمفتاح من لوحة تحكمك.
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
التفاصيل
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