Skip to main content
POST
Go (SDK)

Authorizations

Authorization
string
header
required

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

Filter deployments within a workspace. All filters are optional; with none set, every deployment in the workspace is returned, newest first.

project
string

Restrict results to a single project, identified by its ID or slug. Required when filtering by app, environment, or branch.

Required string length: 3 - 255
Pattern: ^[a-zA-Z0-9_-]+$
Example:

"proj_1234abcd"

app
string

Restrict results to a single app, identified by its ID or slug. Requires project to also be set.

Required string length: 3 - 255
Pattern: ^[a-zA-Z0-9_-]+$
Example:

"proj_1234abcd"

environment
string

Restrict results to a single environment, identified by its ID or slug. Requires project and app to also be set.

Required string length: 3 - 255
Pattern: ^[a-zA-Z0-9_-]+$
Example:

"proj_1234abcd"

status
enum<string>[]

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

Maximum array length: 13

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

Available options:
pending,
starting,
building,
deploying,
network,
finalizing,
ready,
failed,
skipped,
awaiting_approval,
stopped,
superseded,
cancelled
Example:
branch
string[]

Restrict results to deployments built from any of the given git branches. Requires project and app to also be set. Omit or pass an empty list to return deployments from every branch.

Maximum array length: 50
Required string length: 1 - 256
Example:
startTime
integer<int64>

Return only deployments created at or after this unix timestamp in milliseconds (inclusive).

Required range: 0 <= x <= 9223372036854776000
Example:

1704067200000

endTime
integer<int64>

Return only deployments created before this unix timestamp in milliseconds (exclusive). Must be later than startTime when both are set.

Required range: 0 <= x <= 9223372036854776000
Example:

1704672000000

limit
integer
default:100

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

Required range: 1 <= x <= 100
cursor
string

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

Response

Successfully retrieved a paginated list of deployments. Use the pagination cursor for additional results when hasMore: true.

meta
object
required

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.

data
object[]
required

Array of deployments, ordered newest first.

Maximum array length: 100
pagination
object
required

Pagination metadata for list endpoints. Provides information necessary to traverse through large result sets efficiently using cursor-based pagination.