Redeploy a hosted site
Replaces every file of the site with a new ZIP, same rules as publishing. The address stays the same, so codes pointing at it keep working. Visitors switch to the new version only once every file is in place.
Authorization
apiKey An API key from Settings, Developers: Authorization: Bearer kc_live_...
In: header
Path Parameters
1 <= lengthRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/sites/string/deploy" \ -H "Content-Type: application/json" \ -d '{}'{ "site": { "id": "string", "name": "string", "subdomain": "string", "url": "string", "version": 0, "fileCount": 0, "totalSize": 0, "previewUrl": "string", "usedBy": 0, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }, "skipped": [ "string" ]}Stage a large ZIP POST
For ZIPs over about 3 MB. Returns a presigned URL: PUT the ZIP bytes there with `Content-Type: application/zip` and the exact `Content-Length` you declared, within 10 minutes, then pass `uploadId` to POST /sites or POST /sites/{id}/deploy. Each upload deploys once; one that is never deployed is deleted after a day.
Generate an image POST
Creates a picture from a text description and stores it in the workspace Library as a JPEG. Takes a few seconds. Each call counts toward the plan's monthly AI generated images, including prompts the safety filter blocks.