hosting
POST /v1/sites/{siteId}/rename-domain
Change a site's primary domain (asynchronous).
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
| Nombre | Tipo | Obligatorio | ¿Qué es esto? |
|---|---|---|---|
siteId (path) | Uuid | Sí | Site ID (UUIDv7). |
Cuerpo de la solicitud
| Nombre | Tipo | Obligatorio | ¿Qué es esto? |
|---|---|---|---|
new_domain | Hostname | Sí | The site's new primary domain (FQDN). |
keep_old_as_alias | boolean | No | Keep serving the old domain as an alias of the site after the flip. |
Respuesta
| Nombre | Tipo | Obligatorio | ¿Qué es esto? |
|---|---|---|---|
site_id | Uuid | Sí | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
new_domain | Hostname | Sí | A fully-qualified DNS hostname, lowercase, no trailing dot. |
workflow_id | string | Sí | The Temporal workflow id running the rename saga (deterministic per site). |
status | string<accepted> | Sí | The saga was accepted; poll the site / `site.*` events for completion. |
Errores que este endpoint puede devolver
401 · 403 · 404 · 409 · 422 · 429 · 503