> ## Documentation Index
> Fetch the complete documentation index at: https://www.unkey.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Unkey is two separate products. Compute builds, deploys, and runs apps behind a gateway. API Management issues API keys, enforces rate limits, manages identities and permissions, and reports usage. Say which product a page belongs to; a reader can use either without the other.
> Every Unkey API endpoint is an HTTP POST to https://api.unkey.com/v2/{service}.{procedure} with a root key in the Authorization: Bearer header. Root keys are workspace scoped.
> Error codes have the form err:{system}:{category}:{specific} and each has a page at /errors/{system}/{category}/{specific}.
> The word environment means production or preview in Compute. Rate limiting has four meanings on this site; the glossary lists them.

# deployment_not_awaiting_approval

> The deployment is not waiting for approval, so there is nothing to authorize.

<Danger>`err:unkey:application:deployment_not_awaiting_approval`</Danger>

You asked to authorize a deployment that is not waiting for approval. You get HTTP 412.

```json Example response theme={"system"}
{
  "meta": {
    "requestId": "req_2c9a0jf23l4k567"
  },
  "error": {
    "detail": "The deployment is not awaiting approval. Its status is building.",
    "status": 412,
    "title": "Precondition Failed",
    "type": "/errors/unkey/application/deployment_not_awaiting_approval"
  }
}
```

## Likely causes

* Someone already authorized the deployment.
* The deployment was cancelled or superseded before it was authorized.
* The deployment never needed approval. Only deployments from forked pull requests wait for approval.

## How to fix

1. Read the deployment with `deployments.getDeployment` and check its `status`.
2. If the status is past `awaiting_approval`, the deployment is already running its build. There is nothing to do.
3. If the deployment was cancelled or superseded, push a new commit to create a new deployment.

## Related errors

* [`err:unkey:application:precondition_failed`](/docs/errors/unkey/application/precondition_failed): the workspace has no Compute plan or is paused at its spend limit, which also blocks authorization.
* [`err:unkey:data:deployment_not_found`](/docs/errors/unkey/data/deployment_not_found): the deployment does not exist, or your root key cannot write to it.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.