# Azion CLI personal-token

The Azion CLI `personal-token` commands create, list, describe, and delete your [personal tokens](/en/documentation/fundamentals/personal-tokens/), the credentials that authenticate your calls to the Azion API and your CLI commands. Each token has a UUID, which the `--id` flag takes. The options every command accepts, such as `--format`, `--out`, and `-y`, are on [Global options](/en/documentation/devtools/cli/globals/).

---

## Create

`azion create personal-token` creates a personal token with the name, expiration, and description you pass:

```bash
azion create personal-token [flags]
```

| Flag            | Short | Type   | Default | Description                                                                                                                                                                                    |
| --------------- | ----- | ------ | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--description` | —     | string | —       | Description of the personal token.                                                                                                                                                             |
| `--expiration`  | —     | string | —       | **Required** unless `--file` is set. Time until the token expires: a number followed by `d` for days or `m` for months, such as `1d` or `9m`. Without it, the command asks for the expiration. |
| `--file`        | —     | string | —       | Path to a JSON file with the attributes of the personal token. Use `-` to read the JSON from standard input.                                                                                   |
| `--name`        | —     | string | —       | Name of the personal token.                                                                                                                                                                    |

In `--expiration`, `m` stands for months, not minutes: `9m` creates a token that expires nine months later. A value without a number, such as `tomorrow`, is refused with `Error: expected integer`.

This command creates a token named `my-token` that expires the next day:

```bash
azion create personal-token --name my-token --expiration 1d --description 'Token for local CLI tests'
```

The command prints the value of the token. No other `personal-token` command prints it, so store the value when you create the token:

```text
Created Personal Token: [TOKEN VALUE]
```

---

## List

`azion list personal-token` lists your personal tokens. The list shows the UUID, the name, and the expiration of each token, never its value:

```bash
azion list personal-token [flags]
```

| Flag        | Short | Type | Default | Description                                                                                    |
| ----------- | ----- | ---- | ------- | ---------------------------------------------------------------------------------------------- |
| `--details` | —     | —    | —       | Adds the `CREATED AT` and `DESCRIPTION` columns to the `ID`, `NAME`, and `EXPIRES AT` columns. |

This command lists the personal tokens of the user:

```bash
azion list personal-token
```

The command prints one row per token. A token past its expiration stays in the list until you delete it, such as `old-token` below:

```text
ID                                    NAME                               EXPIRES AT
11111111-2222-4333-8444-555555555555  my-token                           2027-01-15 23:59:59 +0000 UTC
22222222-3333-4444-8555-666666666666  my-api-token                       2026-12-20 23:59:59 +0000 UTC
33333333-4444-4555-8666-777777777777  my-cli-token                       2027-09-17 23:59:59 +0000 UTC
44444444-5555-4666-8777-888888888888  old-token                          2026-09-11 23:59:59 +0000 UTC
55555555-5555-4555-8555-555555555555  my-site-deploy                     2027-07-30 20:47:26 +0000 UTC
66666666-6666-4666-8666-666666666666  my-cli-token                       2027-07-29 23:59:59 +0000 UTC
77777777-7777-4777-8777-777777777777  my-cli-token                       2027-07-28 23:59:59 +0000 UTC
88888888-8888-4888-8888-888888888888  my-blog-deploy                     2027-07-24 12:54:21 +0000 UTC
99999999-9999-4999-8999-999999999999  my-store-deploy                    2027-07-24 12:47:07 +0000 UTC
```

---

## Describe

`azion describe personal-token` prints the attributes of one personal token, without its value:

```bash
azion describe personal-token [flags]
```

| Flag   | Short | Type   | Default | Description                             |
| ------ | ----- | ------ | ------- | --------------------------------------- |
| `--id` | —     | string | —       | UUID of the personal token to describe. |

This command describes the token with UUID `11111111-2222-4333-8444-555555555555`:

```bash
azion describe personal-token --id 11111111-2222-4333-8444-555555555555
```

The command prints the UUID, the name, the dates, and the description of the token:

```text
Uuid:          11111111-2222-4333-8444-555555555555
Name:          my-token
Created:       "2026-01-01T15:00:02.219101Z"
Expires At:    "2026-01-02T12:00:00Z"
Description:   "Token for local CLI tests"
```

With `--format json`, the command prints the same attributes under the keys `created`, `description`, `expires_at`, `name`, and `uuid`.

A UUID that matches no token of the user fails with this error:

```text
Error: Failed to get your personal token: The given ID or API's endpoint doesn't exist or isn't available. Check that the identifying information is correct. Check your settings and try again. If the error persists, contact Azion support.
```

---

## Delete

`azion delete personal-token` deletes a personal token:

```bash
azion delete personal-token [flags]
```

| Flag   | Short | Type   | Default | Description                                                                                    |
| ------ | ----- | ------ | ------- | ---------------------------------------------------------------------------------------------- |
| `--id` | —     | string | —       | **Required**. UUID of the personal token to delete. Without it, the command asks for the UUID. |

This command deletes the token with UUID `11111111-2222-4333-8444-555555555555`:

```bash
azion delete personal-token --id 11111111-2222-4333-8444-555555555555
```

The command confirms the deletion:

```text
Personal token 11111111-2222-4333-8444-555555555555 was successfully deleted
```

A UUID that matches no token, such as the UUID of a token you already deleted, fails with this error:

```text
Error: Failed to delete the Personal Token: The given ID or API's endpoint doesn't exist or isn't available. Check that the identifying information is correct. Check your settings and try again. If the error persists, contact Azion support
```

---

## Use a JSON file

`azion create personal-token` reads the attributes of the token from a JSON file with `--file`. The command reads `name`, `expires_at`, and `description`, and `expires_at` takes the same values as `--expiration`.

This file creates a token named `my-file-token` that expires nine months after it is created:

```json
{
  "name": "my-file-token",
  "expires_at": "9m",
  "description": "Token created from a JSON file"
}
```

Pass the file to the create command:

```bash
azion create personal-token --file token-create.json
```

The command prints the value of the token:

```text
Created Personal Token: [TOKEN VALUE]
```

---

## Related resources

- [Global options](/en/documentation/devtools/cli/globals.md): The options every command accepts, such as `--format`, `--out`, and `-y`.
- [Personal Tokens](/en/documentation/fundamentals/personal-tokens.md): What a personal token is, and which expiration to choose for it.
- [Manage a personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens.md): How to create and revoke a personal token in Azion Console or with the API.
- [Azion CLI profile](/en/documentation/devtools/cli/resources/profile.md): The commands that store a personal token in a CLI profile with `--personal-token`.
