Authorize deployment
Changed onAuthorize 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
Request
- Base URLhttps://api.unkey.com
- URLhttps://api.unkey.com/v2/deployments.authorizeDeployment
- AuthHTTP bearer
Request body
Example request
{
"deploymentId": "proj_1234abcd"
}Response
Authorization accepted and enqueued. The deployment moves to pending and builds asynchronously; poll getDeployment to observe its status.
Example response
{
"meta": {
"requestId": "req_123"
}
}Changes
- info
added the non-success response with the status
- info
- info
endpoint added
- info