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.
Extends
Section titled “Extends”Resource
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new WebsitesDeploymentApi(
opts):WebsitesDeploymentApi
Defined in: packages/sdk/src/request.ts:93
Parameters
Section titled “Parameters”Returns
Section titled “Returns”WebsitesDeploymentApi
Inherited from
Section titled “Inherited from”Resource.constructor
Methods
Section titled “Methods”deployment()
Section titled “deployment()”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.”
Parameters
Section titled “Parameters”websiteId
Section titled “websiteId”string
Returns
Section titled “Returns”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()
Section titled “deployments()”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.
Parameters
Section titled “Parameters”websiteId
Section titled “websiteId”string
options?
Section titled “options?”limit?
Section titled “limit?”number
Returns
Section titled “Returns”Promise<{ deployments: object[]; }>
redeploy()
Section titled “redeploy()”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.
Parameters
Section titled “Parameters”websiteId
Section titled “websiteId”string
Returns
Section titled “Returns”Promise<{ deploymentId: string; readyState: string; url: string; }>