Hosting API reference
The deploy API v1 lives under /api/public/hosting/v1 and acts on the site its key belongs to, so no site id appears in a path. This reference is generated from the same route contract the API validates against.
How do requests authenticate?
Send a site API key as a bearer token on every request. Keys are created on the site's API keys tab and shown once; see the quickstart.
Authorization: Bearer shk_...The budget is 120 requests / minute per key.
What do responses look like?
Successful responses are { success: true, message, data } and lists add meta with paging. Errors are { success: false, message, error_code?, errors? }: branch on error_code and show message. Every code is listed on Errors.
The same contract as an OpenAPI 3.1 document: /openapi/hosting-v1.json.
Endpoints
- GET /api/public/hosting/v1/site
- GET /api/public/hosting/v1/deploys
- POST /api/public/hosting/v1/deploys
- GET /api/public/hosting/v1/deploys/:deployId
- POST /api/public/hosting/v1/deploys/:deployId/finalize
- POST /api/public/hosting/v1/deploys/:deployId/promote
- POST /api/public/hosting/v1/rollback
GET /api/public/hosting/v1/site
The key's site with its production deploy and the domains pointed at it.
GET /api/public/hosting/v1/deploys
The site's 50 newest deploys, newest first.
POST /api/public/hosting/v1/deploys
Start a deploy from a manifest: returns one presigned PUT (15 min) per file; PUT each file with the returned headers, then finalize. 422 HOSTING_MANIFEST_INVALID / HOSTING_DEPLOY_TOO_LARGE / HOSTING_TOO_MANY_PENDING. The deploy is always recorded with source 'api' (a body `source` is ignored).
GET /api/public/hosting/v1/deploys/:deployId
One deploy of the site.
POST /api/public/hosting/v1/deploys/:deployId/finalize
Verify every uploaded file and mark the deploy ready; 422 HOSTING_DEPLOY_INCOMPLETE (the deploy is then failed and its files deleted).
POST /api/public/hosting/v1/deploys/:deployId/promote
Make a ready deploy the site's production deploy.
POST /api/public/hosting/v1/rollback
Instant rollback: point production at an earlier ready deploy of the site.