deployments

Authorize deployment

Changed on

Authorize a deployment that is awaiting approval. Deployments from forked pull requests run code from outside your repository, so they wait for a project member to approve them before they build.

The deployment must have the status awaiting_approval. Authorization is asynchronous: this endpoint only enqueues it and returns immediately. The deployment then moves to pending and starts its build. Poll getDeployment to follow its status. If the build cannot start, the deployment returns to awaiting_approval.

Required Permissions

Your root key must have the following permission:

  • unkey:v1:<workspace_id>:projects/<project_id>/apps/<app_id>/environments/<environment_id>/deployments/<deployment_id>#write
post/v2/deployments.authorizeDeployment

Request

  • Base URL
    https://api.unkey.com
  • URL
    https://api.unkey.com/v2/deployments.authorizeDeployment
  • Auth
    HTTP bearer

Request body

deploymentIdstring required

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

Example request

{
  "deploymentId": "proj_1234abcd"
}

Response

Authorization accepted and enqueued. The deployment moves to pending and builds asynchronously; poll getDeployment to observe its status.

dataEmptyResponse required

Empty response object by design. A successful response indicates this operation was successfully executed.

Example response

{
  "meta": {
    "requestId": "req_123"
  }
}

Changes