Skip to main content

List deployments

Retrieve a paginated list of deployments within a workspace, newest first.

Filter by project, app, environment, and lifecycle status. All filters are
optional; with none set, every deployment in the workspace is returned.
Filters nest: app requires project, and environment requires both
project and app. Results are paginated; when hasMore is true, pass the
returned cursor to fetch the next page.

Required Permissions

Your root key must have the environment.*.read_deployment permission.
Listing spans environments, so a grant on a single environment is not
sufficient.

1 min read
post/v2/deployments.listDeployments
Request example
Response
post/v2/deployments.listDeployments

Authorization

Authorizationstringheaderrequired#

Unkey uses bearer tokens for authentication. Public integrations use root keys, while the dashboard proxy uses short-lived JWTs.
To authenticate, include the token in the Authorization header of each request:

Root keys have specific permissions attached to them, controlling what operations they can perform. Legacy permissions use tuple strings like api.*.create_key; resource permissions use Unkey Resource Names plus actions, like unkey:v1:ws_123:keyspaces/*#create_key.
Security best practices:

  • Keep root keys secure and never expose them in client-side code
  • Use different root keys for different environments
  • Rotate keys periodically, especially after team member departures
  • Create keys with minimal necessary permissions following least privilege principle
  • Monitor key usage with audit logs.

Body

application/json
projectstring#

Identifies a resource by either its unique ID or its slug.
Accepts a prefixed ID (such as 'proj_' or 'app_') or a slug.

Length: 3–255Pattern: ^[a-zA-Z0-9_-]+$

appstring#

Identifies a resource by either its unique ID or its slug.
Accepts a prefixed ID (such as 'proj_' or 'app_') or a slug.

Length: 3–255Pattern: ^[a-zA-Z0-9_-]+$

environmentstring#

Identifies a resource by either its unique ID or its slug.
Accepts a prefixed ID (such as 'proj_' or 'app_') or a slug.

Length: 3–255Pattern: ^[a-zA-Z0-9_-]+$

statusenum<string>[]#

Restrict results to deployments in any of the given lifecycle statuses.
Omit to return deployments in every status.

Items: max 13

limitinteger#

Maximum number of deployments to return per request.
Balance between response size and number of pagination calls needed.

Default: 100

Range: 1–100

cursorstring#

Pagination cursor from a previous response to fetch the next page.
Use when hasMore: true in the previous response.

Responses

application/json
Successfully retrieved a paginated list of deployments. Use the pagination cursor for additional results when hasMore: true.
metaobjectrequired#
Metadata object included in every API response. This provides context about the request and is essential for debugging, audit trails, and support inquiries. The requestId is particularly important when troubleshooting issues with the Unkey support team.
Show child attributes
requestIdstringrequired#
A unique id for this request. Always include this ID when contacting support about a specific API request. This identifier allows Unkey's support team to trace the exact request through logs and diagnostic systems to provide faster assistance.
dataobject[]required#
Array of deployments, ordered newest first.

Items: max 100

Show child attributes
idstringrequired#
The unique identifier of the deployment, generated by Unkey.
statusenum<string>required#

Current lifecycle status of the deployment. Poll until it reaches a
terminal state: ready (serving), failed, skipped, superseded, stopped,
or cancelled.

Options:pendingstartingbuildingdeployingnetworkfinalizingreadyfailedskippedawaiting_approvalstoppedsupersededcancelled
isCurrentbooleanrequired#

True when this is the production deployment currently serving traffic, i.e.
on api.acme.com. Only production deployments can be current, and at most one
deployment is current. Rollbacks and promotions change which deployment is
current and serves requests to api.acme.com.

environmentstringrequired#
Slug of the environment this deployment belongs to.
appstringrequired#
Slug of the app this deployment belongs to.
projectstringrequired#
Slug of the project this deployment belongs to.
gitobject#
Show child attributes
commitShastringrequired#
The git commit SHA this deployment was built from.
branchstring#
The git branch this deployment was built from. Omitted when unknown.
dockerobject#
Show child attributes
imagestringrequired#
The Docker image this deployment runs.
availableActionsenum<string>[]required#

Lifecycle operations you are allowed to call on this deployment right now.
Empty when none apply (e.g. while building or in a terminal state).

regionsstring[]required#

Regions this deployment is configured to run in. Empty while the deployment
has no scheduled regions yet.

errorobject#
Show child attributes
codeenum<string>required#

The reason a deployment failed. unknown means Unkey could not classify the
failure; see message for details.

Options:no_schedulable_regionsinvalid_runtime_settingscpu_quota_exceededmemory_quota_exceededstorage_quota_exceededbuild_failedunknown
stepstringrequired#
The pipeline step that failed (e.g. building, deploying, starting).
messagestringrequired#

Human-readable description of why the deployment failed. For programmatic
handling, use code.

domainsstring[]#
Public hostnames this deployment is reachable at.
runtimeobjectrequired#
Show child attributes
vCpusnumberrequired#
CPU allocation in vCPUs (1 = one vCPU, 0.5 = half a vCPU).
memoryMibintegerrequired#
Memory allocation in mebibytes.
storageMibintegerrequired#
Ephemeral storage allocation in mebibytes.
portintegerrequired#
Port the container listens on.
commandstring[]required#
Container entrypoint command override. Empty when none is set.
shutdownSignalenum<string>required#
Signal sent to the container on shutdown.
Options:SIGTERMSIGINTSIGQUITSIGKILL
upstreamProtocolenum<string>required#
Protocol used to reach the container.
Options:http1h2c
healthcheckobject#
Show child attributes
methodenum<string>required#
HTTP method used to probe the container.
Options:GETPOST
pathstringrequired#
HTTP path probed on the container. Must start with a slash.

Length: 1–512Pattern: ^(/[\w\-]+)+(\.[\w]+)?$

intervalSecondsinteger#
How often the probe runs, in seconds. Defaults to 10 when omitted.

Range: 1–3600

timeoutSecondsinteger#
Per-probe timeout, in seconds. Defaults to 5 when omitted.

Range: 1–3600

failureThresholdinteger#
Consecutive failures before the container is restarted. Defaults to 3 when omitted.

Range: 1–100

initialDelaySecondsinteger#
Delay before the first probe runs, in seconds. Defaults to 0 when omitted.

Range: 0–3600

createdAtintegerrequired#
Unix timestamp in milliseconds when the deployment was created.

Range: 0–9223372036854776000

updatedAtinteger#

Unix timestamp in milliseconds when the deployment was last updated.
Omitted if the deployment has never been updated.

Range: 0–9223372036854776000

paginationobjectrequired#
Pagination metadata for list endpoints. Provides information necessary to traverse through large result sets efficiently using cursor-based pagination.
Show child attributes
cursorstring#

Opaque pagination token for retrieving the next page of results.
Include this exact value in the cursor field of subsequent requests.
Cursors are temporary and may expire after extended periods.

Length: 1–1024

hasMorebooleanrequired#

Indicates whether additional results exist beyond this page.
When true, use the cursor to fetch the next page.
When false, you have reached the end of the result set.