Endpoints
- access-groups
- artifacts
- checks
- projects
- deployments
- domains
- dns
- logDrains
- edge-config
- user
- marketplace
- integrations
- authentication
- projectMembers
- environment
- security
- teams
- webhooks
- aliases
- certs
List deployments
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",
target: "production",
to: 1612948664566,
users: "kr1PsOIzqEL5Xg6M4VZcZosf,K4amb7K9dAt5R2vBJWF32bmY",
since: 1540095775941,
until: 1540095775951,
state: "BUILDING,READY",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
// Handle the result
console.log(result);
}
run();
{
"pagination": {
"count": 20,
"next": 1540095775951,
"prev": 1540095775951
},
"deployments": [
{
"uid": "dpl_2euZBFqxYdDMDG1jTrHFnNZ2eUVa",
"name": "docs",
"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",
"inspectorUrl": "https://vercel.com/acme/nextjs/J1hXN00qjUeoYfpEEf7dnDtpSiVq",
"isRollbackCandidate": true,
"projectSettings": {
"framework": "blitzjs",
"gitForkProtection": true,
"customerSupportCodeVisibility": true,
"gitLFS": true,
"devCommand": "<string>",
"installCommand": "<string>",
"buildCommand": "<string>",
"nodeVersion": "22.x",
"outputDirectory": "<string>",
"publicSource": true,
"rootDirectory": "<string>",
"serverlessFunctionRegion": "<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>"
}
}
]
}
Authorizations
Default authentication mechanism
Query Parameters
Name of the deployment.
"docs"
Gets the deployment created after this Date timestamp. (default: current time)
1612948664566
Maximum number of deployments to list from a request.
10
Filter deployments from the given ID or name.
"QmXGTs7mvAMMC7WW5ebrM33qKG32QK3h4vmQMjmY"
Filter deployments based on the environment.
"production"
Gets the deployment created before this Date timestamp. (default: current time)
1612948664566
Filter out deployments based on users who have created the deployment.
"kr1PsOIzqEL5Xg6M4VZcZosf,K4amb7K9dAt5R2vBJWF32bmY"
Get Deployments created after this JavaScript timestamp.
1540095775941
Get Deployments created before this JavaScript timestamp.
1540095775951
Filter deployments based on their state (BUILDING
, ERROR
, INITIALIZING
, QUEUED
, READY
, CANCELED
)
"BUILDING,READY"
Filter deployments based on their rollback candidacy
Filter deployments based on the branch name
Filter deployments based on the SHA
The Team identifier to perform the request on behalf of.
"team_1a2b3c4d5e6f7g8h9i0j1k2l"
The Team slug to perform the request on behalf of.
"my-team-url-slug"
Response
This object contains information related to the pagination of the current request, including the necessary parameters to get the next or previous page of data.
Amount of items in the current page.
20
Timestamp that must be used to request the next page.
1540095775951
Timestamp that must be used to request the previous page.
1540095775951
The unique identifier of the deployment.
"dpl_2euZBFqxYdDMDG1jTrHFnNZ2eUVa"
The name of the deployment.
"docs"
The URL of the deployment.
"docs-9jaeg38me.vercel.app"
Timestamp of when the deployment got created.
1609492210000
The type of the deployment.
LAMBDAS
"LAMBDAS"
Metadata information of the user who created the deployment.
The unique identifier of the user.
"eLrCnEgbKhsHyfbiNR7E8496"
The email address of the user.
"example@example.com"
The username of the user.
"johndoe"
The GitHub login of the user.
"johndoe"
The GitLab login of the user.
"johndoe"
Vercel URL to inspect the deployment.
"https://vercel.com/acme/nextjs/J1hXN00qjUeoYfpEEf7dnDtpSiVq"
The default route that should be used for screenshots and links if configured with microfrontends.
"/docs"
Timestamp of when the deployment got deleted.
1609492210000
Timestamp of when the deployment was undeleted.
1609492210000
Optional flag to indicate if the deployment was soft deleted by retention policy.
true
The source of the deployment.
api-trigger-git-deploy
, cli
, clone/repo
, git
, import
, import/repo
, redeploy
, v0-web
"cli"
In which state is the deployment.
BUILDING
, ERROR
, INITIALIZING
, QUEUED
, READY
, CANCELED
, DELETED
"READY"
In which state is the deployment.
BUILDING
, ERROR
, INITIALIZING
, QUEUED
, READY
, CANCELED
, DELETED
"READY"
Metadata information from the Git provider.
Metadata information from the Git provider.
On which environment has the deployment been deployed to.
production
, staging
"production"
Timestamp of when the deployment got created.
1609492210000
Timestamp of when the deployment started building at.
1609492210000
Timestamp of when the deployment got ready.
1609492210000
Substate of deployment when readyState is 'READY' Tracks whether or not deployment has seen production traffic: - STAGED: never seen production traffic - ROLLING: in the process of gradually transitioning production traffic - PROMOTED: has seen production traffic
STAGED
, ROLLING
, PROMOTED
State of all registered checks
registered
, running
, completed
Conclusion for checks
succeeded
, failed
, skipped
, canceled
Deployment can be used for instant rollback
The project settings which was used for this deployment
blitzjs
, nextjs
, gatsby
, remix
, react-router
, astro
, hexo
, eleventy
, docusaurus-2
, docusaurus
, preact
, solidstart-1
, solidstart
, dojo
, ember
, vue
, scully
, ionic-angular
, angular
, polymer
, svelte
, sveltekit
, sveltekit-1
, ionic-react
, create-react-app
, gridsome
, umijs
, sapper
, saber
, stencil
, nuxtjs
, redwoodjs
, hugo
, jekyll
, brunch
, middleman
, zola
, hydrogen
, vite
, vitepress
, vuepress
, parcel
, fasthtml
, sanity-v3
, sanity
, storybook
22.x
, 20.x
, 18.x
, 16.x
, 14.x
, 12.x
, 10.x
, 8.10.x
The flag saying if Secure Compute network is used for builds
The ID of Secure Compute network used for this deployment
The ID of Secure Compute network used for this deployment's passive functions
The expiration configured by the project retention policy
The expiration proposed to replace the existing expiration
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",
target: "production",
to: 1612948664566,
users: "kr1PsOIzqEL5Xg6M4VZcZosf,K4amb7K9dAt5R2vBJWF32bmY",
since: 1540095775941,
until: 1540095775951,
state: "BUILDING,READY",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
// Handle the result
console.log(result);
}
run();
{
"pagination": {
"count": 20,
"next": 1540095775951,
"prev": 1540095775951
},
"deployments": [
{
"uid": "dpl_2euZBFqxYdDMDG1jTrHFnNZ2eUVa",
"name": "docs",
"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",
"inspectorUrl": "https://vercel.com/acme/nextjs/J1hXN00qjUeoYfpEEf7dnDtpSiVq",
"isRollbackCandidate": true,
"projectSettings": {
"framework": "blitzjs",
"gitForkProtection": true,
"customerSupportCodeVisibility": true,
"gitLFS": true,
"devCommand": "<string>",
"installCommand": "<string>",
"buildCommand": "<string>",
"nodeVersion": "22.x",
"outputDirectory": "<string>",
"publicSource": true,
"rootDirectory": "<string>",
"serverlessFunctionRegion": "<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>"
}
}
]
}