Authorizations
Query Parameters
Example:
Example:
Example:
Example:
Required array length:
1 - 20 elementsExample:
Example:
Example:
Example:
Example:
Example:
Example:
Example:
Example:
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.deployments.getDeployments({
app: "docs",
from: 1612948664566,
limit: 10,
projectId: "QmXGTs7mvAMMC7WW5ebrM33qKG32QK3h4vmQMjmY",
projectIds: [
"prj_123",
"prj_456",
],
target: "production",
to: 1612948664566,
users: "kr1PsOIzqEL5Xg6M4VZcZosf,K4amb7K9dAt5R2vBJWF32bmY",
since: 1540095775941,
until: 1540095775951,
state: "BUILDING,READY",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
console.log(result);
}
run();{
"pagination": {
"count": 20,
"next": 1540095775951,
"prev": 1540095775951
},
"deployments": [
{
"uid": "dpl_2euZBFqxYdDMDG1jTrHFnNZ2eUVa",
"name": "docs",
"projectId": "<string>",
"url": "docs-9jaeg38me.vercel.app",
"created": 1609492210000,
"defaultRoute": "/docs",
"deleted": 1609492210000,
"undeleted": 1609492210000,
"softDeletedByRetention": true,
"source": "cli",
"state": "READY",
"readyState": "READY",
"type": "LAMBDAS",
"creator": {
"uid": "eLrCnEgbKhsHyfbiNR7E8496",
"email": "example@example.com",
"username": "johndoe",
"githubLogin": "johndoe",
"gitlabLogin": "johndoe"
},
"meta": {},
"target": "production",
"aliasError": {
"code": "<string>",
"message": "<string>"
},
"aliasAssigned": 123,
"createdAt": 1609492210000,
"buildingAt": 1609492210000,
"ready": 1609492210000,
"readySubstate": "STAGED",
"checksState": "registered",
"checksConclusion": "succeeded",
"checks": {
"deployment-alias": {
"state": "succeeded",
"startedAt": 123,
"completedAt": 123
}
},
"inspectorUrl": "https://vercel.com/acme/nextjs/J1hXN00qjUeoYfpEEf7dnDtpSiVq",
"errorCode": "BUILD_FAILED",
"errorMessage": "The Deployment has been canceled because this project was not affected",
"oomReport": "out-of-memory",
"isRollbackCandidate": true,
"prebuilt": true,
"projectSettings": {
"framework": "blitzjs",
"gitForkProtection": true,
"customerSupportCodeVisibility": true,
"gitLFS": true,
"devCommand": "<string>",
"installCommand": "<string>",
"buildCommand": "<string>",
"nodeVersion": "24.x",
"outputDirectory": "<string>",
"publicSource": true,
"rootDirectory": "<string>",
"sourceFilesOutsideRootDirectory": true,
"commandForIgnoringBuildStep": "<string>",
"createdAt": 123,
"speedInsights": {
"id": "<string>",
"enabledAt": 123,
"disabledAt": 123,
"canceledAt": 123,
"hasData": true,
"paidAt": 123
},
"webAnalytics": {
"id": "<string>",
"disabledAt": 123,
"canceledAt": 123,
"enabledAt": 123,
"hasData": true
},
"skipGitConnectDuringLink": true,
"gitComments": {
"onPullRequest": true,
"onCommit": true
}
},
"connectBuildsEnabled": true,
"connectConfigurationId": "<string>",
"passiveConnectConfigurationId": "<string>",
"expiration": 123,
"proposedExpiration": 123,
"customEnvironment": {
"id": "<string>",
"slug": "<string>"
}
}
]
}List deployments under the authenticated user or team. If a deployment hasn’t finished uploading (is incomplete), the url property will have a value of null.
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.deployments.getDeployments({
app: "docs",
from: 1612948664566,
limit: 10,
projectId: "QmXGTs7mvAMMC7WW5ebrM33qKG32QK3h4vmQMjmY",
projectIds: [
"prj_123",
"prj_456",
],
target: "production",
to: 1612948664566,
users: "kr1PsOIzqEL5Xg6M4VZcZosf,K4amb7K9dAt5R2vBJWF32bmY",
since: 1540095775941,
until: 1540095775951,
state: "BUILDING,READY",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
console.log(result);
}
run();{
"pagination": {
"count": 20,
"next": 1540095775951,
"prev": 1540095775951
},
"deployments": [
{
"uid": "dpl_2euZBFqxYdDMDG1jTrHFnNZ2eUVa",
"name": "docs",
"projectId": "<string>",
"url": "docs-9jaeg38me.vercel.app",
"created": 1609492210000,
"defaultRoute": "/docs",
"deleted": 1609492210000,
"undeleted": 1609492210000,
"softDeletedByRetention": true,
"source": "cli",
"state": "READY",
"readyState": "READY",
"type": "LAMBDAS",
"creator": {
"uid": "eLrCnEgbKhsHyfbiNR7E8496",
"email": "example@example.com",
"username": "johndoe",
"githubLogin": "johndoe",
"gitlabLogin": "johndoe"
},
"meta": {},
"target": "production",
"aliasError": {
"code": "<string>",
"message": "<string>"
},
"aliasAssigned": 123,
"createdAt": 1609492210000,
"buildingAt": 1609492210000,
"ready": 1609492210000,
"readySubstate": "STAGED",
"checksState": "registered",
"checksConclusion": "succeeded",
"checks": {
"deployment-alias": {
"state": "succeeded",
"startedAt": 123,
"completedAt": 123
}
},
"inspectorUrl": "https://vercel.com/acme/nextjs/J1hXN00qjUeoYfpEEf7dnDtpSiVq",
"errorCode": "BUILD_FAILED",
"errorMessage": "The Deployment has been canceled because this project was not affected",
"oomReport": "out-of-memory",
"isRollbackCandidate": true,
"prebuilt": true,
"projectSettings": {
"framework": "blitzjs",
"gitForkProtection": true,
"customerSupportCodeVisibility": true,
"gitLFS": true,
"devCommand": "<string>",
"installCommand": "<string>",
"buildCommand": "<string>",
"nodeVersion": "24.x",
"outputDirectory": "<string>",
"publicSource": true,
"rootDirectory": "<string>",
"sourceFilesOutsideRootDirectory": true,
"commandForIgnoringBuildStep": "<string>",
"createdAt": 123,
"speedInsights": {
"id": "<string>",
"enabledAt": 123,
"disabledAt": 123,
"canceledAt": 123,
"hasData": true,
"paidAt": 123
},
"webAnalytics": {
"id": "<string>",
"disabledAt": 123,
"canceledAt": 123,
"enabledAt": 123,
"hasData": true
},
"skipGitConnectDuringLink": true,
"gitComments": {
"onPullRequest": true,
"onCommit": true
}
},
"connectBuildsEnabled": true,
"connectConfigurationId": "<string>",
"passiveConnectConfigurationId": "<string>",
"expiration": 123,
"proposedExpiration": 123,
"customEnvironment": {
"id": "<string>",
"slug": "<string>"
}
}
]
}1 - 20 elements