> ## Documentation Index
> Fetch the complete documentation index at: https://unkey-chronark-cli.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# deployment_is_production

> Production deployments cannot be started or stopped directly; use promote or rollback to change what production serves.

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

```json Example theme={"theme":"kanagawa-wave"}
{
  "meta": {
    "requestId": "req_2c9a0jf23l4k567"
  },
  "error": {
    "detail": "Production deployments cannot be stopped.",
    "status": 412,
    "title": "Precondition Failed",
    "type": "https://unkey.com/docs/errors/unkey/application/deployment_is_production"
  }
}
```

## What Happened?

You called `startDeployment` or `stopDeployment` on a deployment in the `production` environment. Neither action applies to production:

* Production deployments serve live traffic and are never stopped directly; doing so would take the app offline.
* Because production is never stopped, there is no stopped state to start from.

Production traffic is controlled with `promoteDeployment` and `rollbackDeployment`, not `start` or `stop`.

`getDeployment` reports the deployment's `environmentId`, and `availableActions` omits both `start` and `stop` for production deployments.

## How To Fix

1. Fetch the deployment with `getDeployment` and inspect `availableActions`; neither `start` nor `stop` is listed for production deployments.
2. To change what production serves, use `promoteDeployment` or `rollbackDeployment`.
3. The `start` and `stop` actions only apply to non-production deployments.

```bash theme={"theme":"kanagawa-wave"}
# Move production traffic instead of stopping or starting it
curl -X POST https://api.unkey.com/v2/deployments.rollbackDeployment \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer unkey_YOUR_API_KEY" \
  -d '{ "deploymentId": "d_5678wxyz" }'
```

## Common Mistakes

* **Trying to take production offline**: Using `stop` on a production deployment instead of promoting or rolling back.
* **Starting production**: Using `start` on a production deployment instead of promoting it.
* **Wrong environment**: Passing a production deployment id when you meant a preview one.

## Related Errors

* [err:unkey:application:deployment\_not\_running](./deployment_not_running) - When stopping a deployment that is not running
* [err:unkey:application:deployment\_not\_stopped](./deployment_not_stopped) - When starting a deployment that is not stopped
* [err:unkey:application:deployment\_is\_stopping](./deployment_is_stopping) - When a stop is already in flight
