ai

PUT /v1/ai/site-builds/{siteBuildId}/files

Replace one generated file's contents.

Alle ai-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 PUT https://api.zinndigital.com/v1/ai/site-builds/{siteBuildId}/files \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "path": <string>, "content": <string> }'

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

Writes `content` to `path` in this draft, creating the file if it does not exist. Adding `robots.txt` to a generated site is the same act as correcting `index.html`, so both are allowed; the size and file-count caps are what bound it. The path goes through the same validator the builder's own output does — relative, no traversal, and a suffix a static host will serve and that cannot execute on our side. Images cannot be edited here because they are not text. **Refused on a published build** (`published`). A published draft's files are what visitors are seeing; editing them here would make the record disagree with the live site silently, until somebody republished for an unrelated reason. Requires `sites.create`.

Parameters

NaamTypeVerplichtWat dit is
siteBuildId (path)UuidJa

Aanvraaglichaam

NaamTypeVerplichtWat dit is
pathstringJaRelative path inside the generated site, e.g. `index.html`.
contentstringJaThe file's complete new contents. May be empty.

Reactie

NaamTypeVerplichtWat dit is
buildSiteBuildJaOne "describe a site and we build it" run. `files` is present on the **detail** and create responses and absent from the **list**, deliberately: a generated tree can be a hundre…
trialSiteBuilderTrialNeeThe **one-time** free allowance for the AI site builder. One grant per organization, for ever — not monthly, and not per site. `granted` is true because the credit was actually…

Fouten die dit eindpunt kan retourneren

401 · 403 · 404 · 422 · 429