ai
POST /v1/ai/site-builds/{siteBuildId}/preview
What publishing this draft would do to that site. Changes nothing.
Authentication
Send an API key as a bearer token. The key must carry the hosting.deploy.manage permission; a key without it is refused with 403, not 404.
This endpoint takes no organisation id. Your key already identifies the organisation it belongs to, and the response is scoped to it.
Try it
Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.
curl -X POST https://api.zinndigital.com/v1/ai/site-builds/{siteBuildId}/preview \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "site_id": <Uuid>, "disposition": <SiteMakerDisposition> }'Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console
Details
Answers "what happens if the site is already there" before anything happens: which existing files are kept, which are added, which would be **overwritten**, and which generated files would be renamed to avoid a collision. This runs the same guard the publication itself runs, not a second description of it. A preview computed by different code is a promise the real path never made, and it would be wrong in exactly the cases that matter. The preview does **not** require the typed confirmation that a `replace` needs. A customer has to be able to see what would be destroyed before deciding to confirm it; demanding the confirmation in order to show the consequence is the wrong way round. Requires `hosting.deploy.manage`.
Parameters
| Name | Type | Required | What it is |
|---|---|---|---|
siteBuildId (path) | Uuid | Yes | — |
Request body
| Name | Type | Required | What it is |
|---|---|---|---|
site_id | Uuid | Yes | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
disposition | SiteMakerDisposition | Yes | What to do with what is already on the destination. `add_to` keeps every existing byte, `revamp` replaces presentation and keeps content, `replace` is destructive and requires a… |
Response
| Name | Type | Required | What it is |
|---|---|---|---|
preview | SiteMakerPreview | Yes | — |
Errors this endpoint can return
401 · 403 · 404 · 422 · 429