hosting

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

Change a site's primary domain (asynchronous).

Todos los endpoints de hosting

Autenticación

Envía una clave de API como token de portador. La clave debe tener el permiso sites.create; una clave que no lo tenga se rechazará con un código 403, no 404.

Este endpoint no requiere ningún id de organización. Su clave ya identifica la organización a la que pertenece, y la respuesta está delimitada a ella.

Pruébalo

Reemplaza cualquier elemento entre corchetes angulares por tus propios valores, y el marcador de posición key con una clave de tu panel de control.

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> }'

¿Has iniciado sesión? La consola de la API en tu panel de control rellena el ID de tu organización real y tu propia clave, y ejecuta la solicitud contra la API en vivo para que puedas ver la respuesta real. Abre este endpoint en la consola de la API

Detalles

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.

Parámetros

NombreTipoObligatorio¿Qué es esto?
siteId (path)UuidSite ID (UUIDv7).

Cuerpo de la solicitud

NombreTipoObligatorio¿Qué es esto?
new_domainHostnameThe site's new primary domain (FQDN).
keep_old_as_aliasbooleanNoKeep serving the old domain as an alias of the site after the flip.

Respuesta

NombreTipoObligatorio¿Qué es esto?
site_idUuidUUIDv7 identifier — sortable by creation time (docs/02 §8).
new_domainHostnameA fully-qualified DNS hostname, lowercase, no trailing dot.
workflow_idstringThe Temporal workflow id running the rename saga (deterministic per site).
statusstring<accepted>The saga was accepted; poll the site / `site.*` events for completion.

Errores que este endpoint puede devolver

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