hosting

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

Change a site's primary domain (asynchronous).

Alle hosting Endpunkte

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

NameTypErforderlichWas es ist
siteId (path)UuidJaSite ID (UUIDv7).

Anfragekörper

NameTypErforderlichWas es ist
new_domainHostnameJaThe site's new primary domain (FQDN).
keep_old_as_aliasbooleanNeinKeep serving the old domain as an alias of the site after the flip.

Antwort

NameTypErforderlichWas es ist
site_idUuidJaUUIDv7 identifier — sortable by creation time (docs/02 §8).
new_domainHostnameJaA fully-qualified DNS hostname, lowercase, no trailing dot.
workflow_idstringJaThe Temporal workflow id running the rename saga (deterministic per site).
statusstring<accepted>JaThe saga was accepted; poll the site / `site.*` events for completion.

Fehler, die dieser Endpunkt zurückgeben kann

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