hosting

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

Change a site's primary domain (asynchronous).

すべての hosting エンドポイント

認証

ベアラー トークンとして API キーを送信します。キーには sites.create 権限が付与されている必要があります。権限のないキーは 404 ではなく 403 で拒否されます。

このエンドポイントは組織IDを受け付けません。お使いのキーによって所属する組織がすでに特定されており、レスポンスはその組織にスコープされます。

試してみる

アングルブラケット内のすべてをご自身の値に置き換え、キーのプレースホルダーをご利用中のダッシュボードのキーに置き換えてください。

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に対してリクエストが実行されるため、実際のレスポンスを確認することができます。 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_domainHostnameはいThe site's new primary domain (FQDN).
keep_old_as_aliasbooleanいいえKeep serving the old domain as an alias of the site after the flip.

返信

名前タイプ必須これがその内容です
site_idUuidはいUUIDv7 identifier — sortable by creation time (docs/02 §8).
new_domainHostnameはいA fully-qualified DNS hostname, lowercase, no trailing dot.
workflow_idstringはいThe Temporal workflow id running the rename saga (deterministic per site).
statusstring<accepted>はいThe saga was accepted; poll the site / `site.*` events for completion.

このエンドポイントが返すエラー

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