Stage a large ZIP
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.
Authorization
apiKey An API key from Settings, Developers: Authorization: Bearer kc_live_...
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/sites/uploads" \ -H "Content-Type: application/json" \ -d '{ "size": 1 }'{ "uploadId": "string", "uploadUrl": "string", "method": "PUT", "headers": { "property1": "string", "property2": "string" }, "expiresAt": "2019-08-24T14:15:22Z"}Get a hosted site GET
One hosted site with its address, deploy number and size.
Redeploy a hosted site POST
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.