> ## 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 workspace token update

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

Update a Workspace API token in your current Workspace.

## Usage

```sh wrap theme={null}
astro workspace token update <flags>
```

## Options

| Option           | Description                                                                | Valid Values                                                                                                   |
| ---------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| `--clean-output` | Print only the token as output. Use this flag in automated workflows.      | None                                                                                                           |
| `--description`  | The description for the token                                              | Any string surrounded by quotations                                                                            |
| `--expiration`   | The expiration date for the token. By default there is no expiration date. | Any integer between 1 and 3650, used to represent days                                                         |
| `--name`         | The current name for the token.                                            | Any string surrounded by quotations                                                                            |
| `--new-name`     | The updated name for the token.                                            | Any string surrounded by quotations                                                                            |
| `--role`         | The token's role in the Workspace.                                         | Possible values are either `WORKSPACE_MEMBER`, `WORKSPACE_AUTHOR`, `WORKSPACE_OPERATOR`, or `WORKSPACE_OWNER`. |

## Examples

```sh wrap theme={null}
astro workspace token update --new-name "My updated API token" --role WORKSPACE_MEMBER
```

## Related commands

* [astro workspace token rotate](/docs/cli/v1.42/astro-workspace-token-rotate)
* [astro workspace token delete](/docs/cli/v1.42/astro-workspace-token-delete)
* [astro workspace switch](/docs/cli/v1.42/astro-workspace-switch)
