Skip to main content
GET
/
v6
/
deployments
getDeployments
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>"
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

Query Parameters

app
string
Example:
from
number
deprecated
Example:
limit
number
Example:
projectId
string
Example:
projectIds
string[]
Required array length: 1 - 20 elements
Example:
target
string
Example:
to
number
deprecated
Example:
users
string
Example:
since
number
Example:
until
number
Example:
state
string
Example:
rollbackCandidate
boolean
branch
string
sha
string
teamId
string
Example:
slug
string
Example:

Response

pagination
object
required
deployments
object[]
required