hosting
POST /v1/sites/{siteId}/rename-domain
Change a site's primary domain (asynchronous).
Authentifizierung
Senden Sie einen API-Schlüssel als Bearer-Token. Der Schlüssel muss über die Berechtigung sites.create verfügen; ein Schlüssel ohne diese wird mit 403 statt 404 abgelehnt.
Dieser Endpunkt erfordert keine Organisations-ID. Ihr Schlüssel identifiziert bereits die zugehörige Organisation, und die Antwort ist entsprechend eingeschränkt.
Ausprobieren
Ersetzen Sie alles in spitzen Klammern durch Ihre eigenen Werte und den Platzhalter für den Schlüssel durch einen Schlüssel aus Ihrem Dashboard.
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> }'Angemeldet? Die API-Konsole in Ihrem Dashboard trägt automatisch Ihre echte Organisations-ID sowie Ihren eigenen Schlüssel ein und führt die Anfrage gegen die Live-API aus, sodass Sie die tatsächliche Antwort sehen können. Öffnen Sie diesen Endpunkt in der API-Konsole
Details
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
| Name | Typ | Erforderlich | Was es ist |
|---|---|---|---|
siteId (path) | Uuid | Ja | Site ID (UUIDv7). |
Anfragekörper
| Name | Typ | Erforderlich | Was es ist |
|---|---|---|---|
new_domain | Hostname | Ja | The site's new primary domain (FQDN). |
keep_old_as_alias | boolean | Nein | Keep serving the old domain as an alias of the site after the flip. |
Antwort
| Name | Typ | Erforderlich | Was es ist |
|---|---|---|---|
site_id | Uuid | Ja | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
new_domain | Hostname | Ja | A fully-qualified DNS hostname, lowercase, no trailing dot. |
workflow_id | string | Ja | The Temporal workflow id running the rename saga (deterministic per site). |
status | string<accepted> | Ja | The saga was accepted; poll the site / `site.*` events for completion. |
Fehler, die dieser Endpunkt zurückgeben kann
401 · 403 · 404 · 409 · 422 · 429 · 503