Skip to main content
GET
/
v13
/
deployments
/
{idOrUrl}
getDeployment
import { Vercel } from "@vercel/sdk";

const vercel = new Vercel({
  bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await vercel.deployments.getDeployment({
    idOrUrl: "dpl_89qyp1cskzkLrVicDaZoDbjyHuDJ",
    withGitRepoInfo: "true",
    teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
    slug: "my-team-url-slug",
  });

  console.log(result);
}

run();
{
  "aliasAssignedAt": 123,
  "alwaysRefuseToBuild": true,
  "build": {
    "env": [
      "<string>"
    ]
  },
  "buildArtifactUrls": [
    "<string>"
  ],
  "builds": [
    {
      "use": "<string>",
      "src": "<string>",
      "config": {}
    }
  ],
  "env": [
    "<string>"
  ],
  "inspectorUrl": "<string>",
  "isInConcurrentBuildsQueue": true,
  "isInSystemBuildsQueue": true,
  "projectSettings": {
    "buildCommand": "<string>",
    "devCommand": "<string>",
    "framework": "blitzjs",
    "commandForIgnoringBuildStep": "<string>",
    "installCommand": "<string>",
    "outputDirectory": "<string>",
    "speedInsights": {
      "id": "<string>",
      "enabledAt": 123,
      "disabledAt": 123,
      "canceledAt": 123,
      "hasData": true,
      "paidAt": 123
    },
    "webAnalytics": {
      "id": "<string>",
      "disabledAt": 123,
      "canceledAt": 123,
      "enabledAt": 123,
      "hasData": true
    }
  },
  "readyStateReason": "<string>",
  "integrations": {
    "status": "skipped",
    "startedAt": 123,
    "completedAt": 123,
    "skippedAt": 123,
    "skippedBy": "<string>"
  },
  "images": {
    "sizes": [
      123
    ],
    "qualities": [
      123
    ],
    "domains": [
      "<string>"
    ],
    "remotePatterns": [
      {
        "protocol": "http",
        "hostname": "<string>",
        "port": "<string>",
        "pathname": "<string>",
        "search": "<string>"
      }
    ],
    "localPatterns": [
      {
        "pathname": "<string>",
        "search": "<string>"
      }
    ],
    "minimumCacheTTL": 123,
    "formats": [
      "image/avif"
    ],
    "dangerouslyAllowSVG": true,
    "contentSecurityPolicy": "<string>",
    "contentDispositionType": "inline"
  },
  "alias": [],
  "aliasAssigned": true,
  "bootedAt": 123,
  "buildingAt": 123,
  "buildContainerFinishedAt": 123,
  "buildSkipped": true,
  "creator": {
    "uid": "96SnxkFiMyVKsK3pnoHfx3Hz",
    "username": "john-doe",
    "avatar": "<string>"
  },
  "initReadyAt": 123,
  "isFirstBranchDeployment": true,
  "lambdas": [
    {
      "id": "<string>",
      "createdAt": 123,
      "readyState": "BUILDING",
      "entrypoint": "<string>",
      "readyStateAt": 123,
      "output": [
        {
          "path": "<string>",
          "functionName": "<string>"
        }
      ]
    }
  ],
  "public": false,
  "ready": 123,
  "status": "QUEUED",
  "team": {
    "id": "<string>",
    "name": "<string>",
    "slug": "<string>",
    "avatar": "<string>"
  },
  "userAliases": [
    "sub1.example.com",
    "sub2.example.com"
  ],
  "previewCommentsEnabled": false,
  "ttyBuildLogs": true,
  "customEnvironment": {
    "id": "<string>",
    "slug": "<string>",
    "type": "production",
    "description": "<string>",
    "branchMatcher": {
      "type": "endsWith",
      "pattern": "<string>"
    },
    "domains": [
      {
        "name": "<string>",
        "apexName": "<string>",
        "projectId": "<string>",
        "redirect": "<string>",
        "redirectStatusCode": 307,
        "gitBranch": "<string>",
        "customEnvironmentId": "<string>",
        "updatedAt": 123,
        "createdAt": 123,
        "verified": true,
        "verification": [
          {
            "type": "<string>",
            "domain": "<string>",
            "value": "<string>",
            "reason": "<string>"
          }
        ]
      }
    ],
    "currentDeploymentAliases": [
      "<string>"
    ],
    "createdAt": 123,
    "updatedAt": 123
  },
  "oomReport": "out-of-memory",
  "aliasWarning": {
    "code": "<string>",
    "message": "<string>",
    "link": "<string>",
    "action": "<string>"
  },
  "id": "dpl_89qyp1cskzkLrVicDaZoDbjyHuDJ",
  "createdAt": 1540257589405,
  "readyState": "READY",
  "name": "my-project",
  "type": "LAMBDAS",
  "aliasError": null,
  "aliasFinal": "<string>",
  "autoAssignCustomDomains": true,
  "automaticAliases": [
    "<string>"
  ],
  "buildErrorAt": 123,
  "checksState": "registered",
  "checksConclusion": "succeeded",
  "deletedAt": 1540257589405,
  "defaultRoute": "<string>",
  "canceledAt": 123,
  "errorCode": "<string>",
  "errorLink": "<string>",
  "errorMessage": "<string>",
  "errorStep": "<string>",
  "passiveRegions": [
    "<string>"
  ],
  "gitSource": {
    "type": "github",
    "repoId": "<string>",
    "ref": "<string>",
    "sha": "<string>",
    "prId": 123
  },
  "meta": {},
  "originCacheRegion": "<string>",
  "nodeVersion": "22.x",
  "project": {
    "id": "<string>",
    "name": "<string>",
    "framework": "<string>"
  },
  "readySubstate": "STAGED",
  "regions": [
    "sfo1"
  ],
  "softDeletedByRetention": "true",
  "source": "cli",
  "target": null,
  "undeletedAt": 1540257589405,
  "url": "my-instant-deployment-3ij3cxz9qr.now.sh",
  "version": 2,
  "oidcTokenClaims": {
    "iss": "<string>",
    "sub": "<string>",
    "scope": "<string>",
    "aud": "<string>",
    "owner": "<string>",
    "owner_id": "<string>",
    "project": "<string>",
    "project_id": "<string>",
    "environment": "<string>"
  },
  "projectId": "<string>",
  "plan": "pro",
  "connectBuildsEnabled": true,
  "connectConfigurationId": "<string>",
  "createdIn": "<string>",
  "crons": [
    {
      "schedule": "<string>",
      "path": "<string>"
    }
  ],
  "functions": {},
  "monorepoManager": "<string>",
  "ownerId": "<string>",
  "passiveConnectConfigurationId": "<string>",
  "routes": [
    {
      "src": "<string>",
      "dest": "<string>",
      "headers": {},
      "methods": [
        "<string>"
      ],
      "continue": true,
      "override": true,
      "caseSensitive": true,
      "check": true,
      "important": true,
      "status": 123,
      "has": [
        {
          "type": "host",
          "value": "<string>"
        }
      ],
      "missing": [
        {
          "type": "host",
          "value": "<string>"
        }
      ],
      "mitigate": {
        "action": "challenge"
      },
      "transforms": [
        {
          "type": "request.headers",
          "op": "append",
          "target": {
            "key": "<string>"
          },
          "args": "<string>"
        }
      ],
      "locale": {
        "redirect": {},
        "cookie": "<string>"
      },
      "middlewarePath": "<string>",
      "middlewareRawSrc": [
        "<string>"
      ],
      "middleware": 123
    }
  ],
  "gitRepo": {
    "namespace": "<string>",
    "projectId": 123,
    "type": "gitlab",
    "url": "<string>",
    "path": "<string>",
    "defaultBranch": "<string>",
    "name": "<string>",
    "private": true,
    "ownerType": "team"
  },
  "flags": {
    "definitions": {}
  },
  "microfrontends": {
    "isDefaultApp": true,
    "defaultAppProjectName": "<string>",
    "defaultRoute": "<string>",
    "groupIds": [
      "<string>"
    ],
    "microfrontendsAlias2Enabled": true
  },
  "config": {
    "version": 123,
    "functionType": "fluid",
    "functionMemoryType": "standard",
    "functionTimeout": 123,
    "secureComputePrimaryRegion": "<string>",
    "secureComputeFallbackRegion": "<string>",
    "isUsingActiveCPU": true
  },
  "checks": {
    "deployment-alias": {
      "state": "succeeded",
      "startedAt": 123,
      "completedAt": 123
    }
  }
}

Authorizations

Authorization
string
header
required

Default authentication mechanism

Path Parameters

idOrUrl
string
required

The unique identifier or hostname of the deployment.

Example:

"dpl_89qyp1cskzkLrVicDaZoDbjyHuDJ"

Query Parameters

withGitRepoInfo
string

Whether to add in gitRepo information.

Example:

"true"

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

The deployment including only public information The deployment including both public and private information

  • Option 1
  • Option 2

The deployment including both public and private information

build
object
required
env
string[]
required
inspectorUrl
string | null
required
isInConcurrentBuildsQueue
boolean
required
isInSystemBuildsQueue
boolean
required
projectSettings
object
required
aliasAssigned
boolean
required

A boolean that will be true when the aliases from the alias property were assigned successfully

Example:

true

bootedAt
number
required
buildingAt
number
required
buildSkipped
boolean
required
creator
object
required

Information about the deployment creator

public
boolean
required

A boolean representing if the deployment is public or not. By default this is false

Example:

false

status
enum<string>
required
Available options:
QUEUED,
BUILDING,
ERROR,
INITIALIZING,
READY,
CANCELED
id
string
required

A string holding the unique ID of the deployment

Example:

"dpl_89qyp1cskzkLrVicDaZoDbjyHuDJ"

createdAt
number
required

A number containing the date when the deployment was created in milliseconds

Example:

1540257589405

readyState
enum<string>
required

The state of the deployment depending on the process of deploying, or if it is ready or in an error state

Available options:
QUEUED,
BUILDING,
ERROR,
INITIALIZING,
READY,
CANCELED
Example:

"READY"

name
string
required

The name of the project associated with the deployment at the time that the deployment was created

Example:

"my-project"

type
enum<string>
required
Available options:
LAMBDAS
meta
object
required
regions
string[]
required

The regions the deployment exists in

Example:
["sfo1"]
url
string
required

A string with the unique URL of the deployment

Example:

"my-instant-deployment-3ij3cxz9qr.now.sh"

version
enum<number>
required

The platform version that was used to create the deployment.

Available options:
2
Example:

2

projectId
string
required
plan
enum<string>
required
Available options:
pro,
enterprise,
hobby
createdIn
string
required
ownerId
string
required
routes
object[] | null
required
  • Option 1
  • Option 2
  • Option 3
aliasAssignedAt
alwaysRefuseToBuild
boolean
buildArtifactUrls
string[]
builds
object[]
readyStateReason
string
integrations
object
images
object
alias
string[]

A list of all the aliases (default aliases, staging aliases and production aliases) that were assigned upon deployment creation

Example:
[]
buildContainerFinishedAt
number

Since April 2025 it necessary for On-Demand Concurrency Minutes calculation

initReadyAt
number
isFirstBranchDeployment
boolean
lambdas
object[]
ready
number
team
object

The team that owns the deployment if any

userAliases
string[]

An array of domains that were provided by the user when creating the Deployment.

Example:
["sub1.example.com", "sub2.example.com"]
previewCommentsEnabled
boolean

Whether or not preview comments are enabled for the deployment

Example:

false

ttyBuildLogs
boolean
customEnvironment
object

If the deployment was created using a Custom Environment, then this property contains information regarding the environment used.

  • Option 1
  • Option 2
oomReport
enum<string>
Available options:
out-of-memory
aliasWarning
object | null
aliasError
object | null

An object that will contain a code and a message when the aliasing fails, otherwise the value will be null

Example:

null

aliasFinal
string | null
autoAssignCustomDomains
boolean

applies to custom domains only, defaults to true

automaticAliases
string[]
buildErrorAt
number
checksState
enum<string>
Available options:
registered,
running,
completed
checksConclusion
enum<string>
Available options:
succeeded,
failed,
skipped,
canceled
deletedAt
number | null

A number containing the date when the deployment was deleted at milliseconds

Example:

1540257589405

defaultRoute
string

Computed field that is only available for deployments with a microfrontend configuration.

canceledAt
number
errorCode
string
errorMessage
string | null
errorStep
string
passiveRegions
string[]

Since November 2023 this field defines a set of regions that we will deploy the lambda to passively Lambdas will be deployed to these regions but only invoked if all of the primary regions are marked as out of service

gitSource
object
  • Option 1
  • Option 2
  • Option 3
  • Option 4
  • Option 5
  • Option 6
  • Option 7
  • Option 8
  • Option 9
  • Option 10
  • Option 11
  • Option 12
  • Option 13
  • Option 14
  • Option 15
originCacheRegion
string
nodeVersion
enum<string>

If set it overrides the projectSettings.nodeVersion for this deployment.

Available options:
22.x,
20.x,
18.x,
16.x,
14.x,
12.x,
10.x,
8.10.x
project
object

The public project information associated with the deployment.

readySubstate
enum<string>

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 having production traffic gradually transitioned. - PROMOTED: has seen production traffic

Available options:
STAGED,
ROLLING,
PROMOTED
softDeletedByRetention
boolean

flag to indicate if the deployment was deleted by retention policy

Example:

"true"

source
enum<string>

Where was the deployment created from

Available options:
api-trigger-git-deploy,
cli,
clone/repo,
git,
import,
import/repo,
redeploy,
v0-web
Example:

"cli"

target
enum<string> | null

If defined, either staging if a staging alias in the format <project>.<team>.now.sh was assigned upon creation, or production if the aliases from alias were assigned. null value indicates the "preview" deployment.

Available options:
staging,
production
Example:

null

undeletedAt
number

A number containing the date when the deployment was undeleted at milliseconds

Example:

1540257589405

oidcTokenClaims
object
connectBuildsEnabled
boolean
connectConfigurationId
string
crons
object[]
functions
object | null
monorepoManager
string | null
passiveConnectConfigurationId
string

Since November 2023 this field defines a Secure Compute network that will only be used to deploy passive lambdas to (as in passiveRegions)

gitRepo
object
  • Option 1
  • Option 2
  • Option 3
flags

Flags defined in the Build Output API, used by this deployment. Primarily used by the Toolbar to know about the used flags.

microfrontends
object
  • Option 1
  • Option 2
config
object

Since February 2025 the configuration must include snapshot data at the time of deployment creation to capture properties for the /deployments/:id/config endpoint utilized for displaying Deployment Configuration on the frontend This is optional because older deployments may not have this data captured

checks
object