Deploys
Deploys build the project on Vercel and make it live. A deploy is asynchronous: create returns immediately with a QUEUED status, then you poll for completion. Deleting the deploy takes the site offline.
Create a deploy
Section titled “Create a deploy”POST /api/v1/projects/{id}/deployBody: optional force (boolean) to start a deploy while another is running. Returns { deploy: { status: "QUEUED", id, url } } with 202. Responds 409 deploy_in_progress if one is already queued or building and force is not set.
await client.deploys.create(projectId) // { force: true } to overrideDeploy status
Section titled “Deploy status”GET /api/v1/projects/{id}/deployReturns { deploy: { status, logs, url, deployed_at, duration_ms } }. status is the Vercel deployment state: QUEUED, INITIALIZING, BUILDING, READY, ERROR or CANCELED.
let deploy = await client.deploys.status(projectId)while (deploy.status && !['READY', 'ERROR'].includes(deploy.status)) { await new Promise((r) => setTimeout(r, 3000)) deploy = await client.deploys.status(projectId)}console.log(deploy.status, deploy.url, deploy.logs)Take the site offline
Section titled “Take the site offline”DELETE /api/v1/projects/{id}/deployRemoves the live deployment, as Unpublish does in the app. The project’s Vercel project, domains and env vars stay attached, so deploying again brings the site back. Returns { deployed: false }.
await client.deploys.delete(projectId)