hosting

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

Change a site's primary domain (asynchronous).

Alle hosting-eindpunten

Authenticatie

Stuur een API-sleutel mee als bearer token. De sleutel moet over de permissie sites.create beschikken; een sleutel zonder deze permissie wordt geweigerd met een 403 in plaats van een 404.

Dit eindpunt vereist geen organisatie-id. Uw sleutel identificeert al de organisatie waartoe deze behoort, en het antwoord is hierop afgestemd.

Probeer het

Vervang alles tussen punthaakjes door uw eigen waarden en de sleutelplaatsvervanger door een sleutel uit uw 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> }'

Ingelogd? De API-console in je dashboard vult je echte organisatie-id en je eigen sleutel in, en voert het verzoek uit tegen de live API zodat je de daadwerkelijke respons kunt zien. Open dit eindpunt in de API-console

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.

Parameters

NaamTypeVerplichtWat dit is
siteId (path)UuidJaSite ID (UUIDv7).

Aanvraaglichaam

NaamTypeVerplichtWat dit is
new_domainHostnameJaThe site's new primary domain (FQDN).
keep_old_as_aliasbooleanNeeKeep serving the old domain as an alias of the site after the flip.

Reactie

NaamTypeVerplichtWat dit is
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.

Fouten die dit eindpunt kan retourneren

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