> ## 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.

# rollback-deployment

> Rollback deployment with the Unkey API CLI

Create a rollback from an earlier deployment.

## Usage

```bash theme={"theme":"kanagawa-wave"}
unkey api deployments rollback-deployment [flags]
```

## Flags

<ParamField body="--deployment-id" type="string" required>
  Unique deployment identifier.
</ParamField>

## Global Flags

| Flag         | Type   | Description                                                                                   |
| ------------ | ------ | --------------------------------------------------------------------------------------------- |
| `--root-key` | string | Override root key (`$UNKEY_ROOT_KEY`)                                                         |
| `--api-url`  | string | Override API base URL (default: `https://api.unkey.com`)                                      |
| `--config`   | string | Path to config file (default: `~/.unkey/config.toml`)                                         |
| `--output`   | string | Output format - use `json` for raw JSON                                                       |
| `--body`     | string | Send this JSON string as the request body. You cannot combine it with request-building flags. |

## Examples

<CodeGroup>
  ```bash Basic theme={"theme":"kanagawa-wave"}
  unkey api deployments rollback-deployment --deployment-id=dep_1234abcd
  ```
</CodeGroup>

See the [Rollback deployment API reference](https://www.unkey.com/docs/api-reference/v2/deployments/rollback-deployment).
