Skip to content

WebsitesDeploymentApi

Defined in: packages/sdk/src/resources/WebsitesApi.ts:748

Vercel deployment surface — read the most recent deployment (state, commit, error), or kick off a fresh redeploy.

  • Resource

new WebsitesDeploymentApi(opts): WebsitesDeploymentApi

Defined in: packages/sdk/src/request.ts:93

VantageClientOptions

WebsitesDeploymentApi

Resource.constructor

deployment(websiteId): Promise<{ deployment: { createdAt: number; errorMessage?: string; inspectorUrl?: string; meta?: { githubCommitAuthorName?: string; githubCommitMessage?: string; githubCommitSha?: string; }; ready?: number; readyState?: string; state: string; uid: string; url: string; } | null; }>

Defined in: packages/sdk/src/resources/WebsitesApi.ts:756

Most-recent Vercel deployment for the website. Returns the deployment summary including state (READY/ERROR/BUILDING), the inspector URL, the commit SHA + message that built it, and — crucially — errorMessage when state is ERROR. This is the first thing to check when “the site isn’t updating.”

string

Promise<{ deployment: { createdAt: number; errorMessage?: string; inspectorUrl?: string; meta?: { githubCommitAuthorName?: string; githubCommitMessage?: string; githubCommitSha?: string; }; ready?: number; readyState?: string; state: string; uid: string; url: string; } | null; }>


deployments(websiteId, options?): Promise<{ deployments: object[]; }>

Defined in: packages/sdk/src/resources/WebsitesApi.ts:783

Deployment history — newest-first list of recent Vercel deployments for the website’s linked project. Drives the portal’s DeploymentsTab. Returns an empty array (NOT an error) when no Vercel project is linked yet.

limit defaults to 20 server-side, max 100.

string

number

Promise<{ deployments: object[]; }>


redeploy(websiteId): Promise<{ deploymentId: string; readyState: string; url: string; }>

Defined in: packages/sdk/src/resources/WebsitesApi.ts:814

Force a fresh Vercel deploy. Useful after env-var changes that Vercel doesn’t auto-detect, or to re-run a build after the source repo was patched.

string

Promise<{ deploymentId: string; readyState: string; url: string; }>