ai

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

Replace one generated file's contents.

Бүх ai төгсгөлийн цэгүүд

Баталгаажуулалт

API түлхүүрийг bearer token хэлбэрээр илгөэнэ үү. Түлхүүр нь sites.create эрхтэй байх ёстой бөгөөд үүнгүйгээр 404 биш, харин 403 алдаа буцааж татгалзах болно.

Энэ төгсгөл цэг нь ямар ч байгууллагын ID шаардахгүй. Таны түлхүүр аль хэдийн харьяалагдах байгууллагыг тодорхойлж байгаа бөгөөд хариу нь тухайн байгууллагын хүрээнд хязгаарлагдана.

Туршиж үзэх

Өнцөг хаалтанд байгаа бүх зүйлийг өөрийн утгаар солиж, түлхүүр санамж байрлуулагчийг хяналтын самбарынхаа түлхүүрээр сольж оруулна уу.

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

Та нэвтэрсэн байна уу? Таны хяналтын самбар дахь API консол нь таны бодит байгууллагын ID болон өөрийн түлхүүрийг автоматаар бөглөж, шууд ажиллаж буй API рүү хүсэлт илгээх тул та бодит хариуг харах боломжтой болно. Энэ төгсгөлийн цэгийг API консол дээр нээх

Дэлгэрэнгүй

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`.

Параметрүүд

НэрТөрөлЗаавал шаардлагатайЭнэ юу вэ
siteBuildId (path)UuidТийм

Хүсэлтийн бие

НэрТөрөлЗаавал шаардлагатайЭнэ юу вэ
pathstringТиймRelative path inside the generated site, e.g. `index.html`.
contentstringТиймThe file's complete new contents. May be empty.

Хариу үйлдэл

НэрТөрөлЗаавал шаардлагатайЭнэ юу вэ
buildSiteBuildТиймOne "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…
trialSiteBuilderTrialҮгүйThe **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…

Энэ төгсгөл цэгээс буцааж болох алдаанууд

401 · 403 · 404 · 422 · 429