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

<Info>
  This command is only available on Astro.
</Info>

Create a [Deployment API Token](/docs/astro/deployment-api-tokens).

See [Authenticate an automation tool](/docs/astro/automation-authentication) to use your API token in an automated process.

## Usage

```sh wrap theme={null}
astro deployment token create --deployment-id=<deployment-id>
```

## Options

| Option                | Description                                                                                                    | Possible Values              |
| --------------------- | -------------------------------------------------------------------------------------------------------------- | ---------------------------- |
| `-c`,`--clean-output` | Print only the token as output. For use of the command in scripts.                                             | `True` or `False`            |
| `-d`,`--description`  | Description of the token. If the description contains a space, specify the entire description within quotes "" | String                       |
| `-e`,`--expiration`   | Expiration of the token in days. If the flag isn't used the token won't have an expiration.                    | An integer between 1 and 365 |
| `-n`,`--name`         | The token's name. If the name contains a space, specify the entire name within quotes `""`.                    | String                       |
| `-r`,`--role`         | The role for the token. Possible values are `DEPLOYMENT_ADMIN` or a custom role name.                          | Any valid Deployment role    |

## Examples

```bash wrap theme={null}
# create a deployment token
astro deployment token create --deployment-id=clukapi6r000008l58530cg8i
```

## Related commands

* [`astro deployment token list`](/docs/cli/v1.40/astro-deployment-token-list)
* [`astro deployment token rotate`](/docs/cli/v1.40/astro-deployment-token-rotate)
* [`astro deployment token update`](/docs/cli/v1.40/astro-deployment-token-update)
