GET
/
v6
/
deployments
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

Authorization
string
header
required

Default authentication mechanism

Query Parameters

app
string

Name of the deployment.

Example:

"docs"

from
number
deprecated

Gets the deployment created after this Date timestamp. (default: current time)

Example:

1612948664566

limit
number

Maximum number of deployments to list from a request.

Example:

10

projectId
string

Filter deployments from the given ID or name.

Example:

"QmXGTs7mvAMMC7WW5ebrM33qKG32QK3h4vmQMjmY"

target
string

Filter deployments based on the environment.

Example:

"production"

to
number
deprecated

Gets the deployment created before this Date timestamp. (default: current time)

Example:

1612948664566

users
string

Filter out deployments based on users who have created the deployment.

Example:

"kr1PsOIzqEL5Xg6M4VZcZosf,K4amb7K9dAt5R2vBJWF32bmY"

since
number

Get Deployments created after this JavaScript timestamp.

Example:

1540095775941

until
number

Get Deployments created before this JavaScript timestamp.

Example:

1540095775951

state
string

Filter deployments based on their state (BUILDING, ERROR, INITIALIZING, QUEUED, READY, CANCELED)

Example:

"BUILDING,READY"

rollbackCandidate
boolean

Filter deployments based on their rollback candidacy

branch
string

Filter deployments based on the branch name

sha
string

Filter deployments based on the SHA

teamId
string

The Team identifier to perform the request on behalf of.

Example:

"team_1a2b3c4d5e6f7g8h9i0j1k2l"

slug
string

The Team slug to perform the request on behalf of.

Example:

"my-team-url-slug"

Response

200
application/json
pagination
object
required

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.

deployments
object[]
required