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

# astro deployment token rotate

> Rotate your Deployment API tokens.

> [!NOTE]
>
> This command is only available on Astro.

Rotate an Astro [Deployment API Token](https://astronomer.io/docs/astro/deployment-api-tokens.md).

To use your API token in an automated process, see [Authenticate an automation tool](https://astronomer.io/docs/astro/automation-authentication.md).

## Usage

```sh wrap theme={null}
astro deployment token rotate <token-id> --deployment-id=<deployment-id> [flags]
```

## Options

| Option | Description | Possible Values |
| - | - | - |
| `-c`,`--clean-output` | Print only the token as output. Use when writing scripts that run the command. | N/A |
| `-f`, `--force` | Rotate the Deployment API token without showing a warning. | N/A |
| `-t`,`--name` | The name of the token to be rotated. If the name contains a space, specify the entire name within quotes "". | String |

## Examples

```bash wrap theme={null}
astro deployment token rotate --deployment-id=clukapi6r000008l58530cg8i --name "My token"
```

## Related commands

* [`astro deployment token create`](https://astronomer.io/docs/cli/v1.47/astro-deployment-token-create)
* [`astro deployment token list`](https://astronomer.io/docs/cli/v1.47/astro-deployment-token-list)
* [`astro deployment token update`](https://astronomer.io/docs/cli/v1.47/astro-deployment-token-update)
