ai

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

Replace one generated file's contents.

Բոլոր ai վերջնակետերը

Բոլոր մշակողների փաստաթղթերը

Նույնականացում

Ուղարկեք API բանալին որպես bearer token: Բանալին պետք է ունենա sites.create թույլտվությունը. առանց դրա բանալին մերժվում է 403, և ոչ թե 404 կարգավիճակով:

Այս վերջնակետը կազմակերպության 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 hundred…
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