> AI agents: this is one page from Mammoth Analytics documentation. The index of all pages as Markdown is https://mammoth.io/docs/llms.txt. Append `.md` to any docs URL, or send `Accept: text/markdown`, to get Markdown.

# mammoth token

> All 3 mammoth token commands with examples, arguments and confirmation flags: Create, list, and revoke long-lived API keys (aliases of client-app).

> Generated from mammoth-cli 2.4.2, released 2026-11-02: `mammoth schema list`, `mammoth capability list` and the CLI's own `--help`. Do not edit by hand; run `npm run docs:capabilities`.

Create, list, and revoke long-lived API keys (aliases of client-app). 3 commands.

Every command also takes the [global flags](https://mammoth.io/docs/build/cli/global-flags/) (`--output`, `--yes`, `--confirm`, `--dry-run`, `--input`, `--profile`, ...), which are not repeated below. `--input` takes a JSON or YAML document of the input fields; `mammoth schema get COMMAND_ID` prints a command's full input schema.

**Confirmation.** Commands marked `--yes --confirm TARGET` or `--yes` always need those flags, even at a terminal: they never prompt. Commands marked "`--yes` or prompt" ask at an interactive terminal (table output, no `--no-input`) and otherwise need `--yes`. `--dry-run` skips confirmation and sends nothing.

## Summary

| Command | What it does | Effect | Confirmation |
|---|---|---|---|
| [`token create`](#mammoth-token-create) | Create a client app. Name comes from a positional or the 'app_name' field. | High impact | `--yes --confirm TARGET` |
| [`token list`](#mammoth-token-list) | List the workspace's API keys (client apps). Requires an admin role. | Read | — |
| [`token revoke`](#mammoth-token-revoke) | Permanently delete one client app by its client key. Prompt or '--yes' required. | Destructive | `--yes` or prompt |

## token commands

### mammoth token create

Create a client app. Name comes from a positional or the 'app_name' field.

```bash
mammoth token create 'Revenue report' --yes --confirm 'Revenue report'
```

| Name | Passed as | Required | Default | Type | Notes |
|---|---|---|---|---|---|
| `APP_NAME` | positional | no | — | `str` | Name of the new API key; or pass it via the 'app_name' input field. Or the `app_name` input field. |
| `app_name` | `--input` field | no | — | `str` |  |
| `description` | `--input` field | no | — | `str` |  |

- **Effect:** High impact, scope `profile` · **Confirmation:** always `--yes --confirm TARGET`, even at a terminal (TARGET is the exact id or name acted on; the `confirmation_required` error's hint names it)
- **Preconditions:** The token is shown once, in this response only; store it at once. It is redacted from logs and diagnostics. Needs --yes.
- **Id:** `token.create` · **Result:** `ClientAppCreateResult`

### mammoth token list

List the workspace's API keys (client apps). Requires an admin role.

```bash
mammoth token list
```

| Name | Passed as | Required | Default | Type | Notes |
|---|---|---|---|---|---|
| `limit` | `--input` field | no | `10` | `int` |  |
| `offset` | `--input` field | no | `0` | `int` |  |
| `fields` | `--input` field | no | — | `str` |  |
| `sort` | `--input` field | no | — | `str` |  |

- **Effect:** Read, scope `profile` · **Confirmation:** none · **Pages:** `offset`
- **Preconditions:** Lists the workspace's API tokens.
- **Id:** `token.list` · **Result:** `ClientAppListResult`

### mammoth token revoke

Permanently delete one client app by its client key. Prompt or '--yes' required.

```bash
mammoth token revoke web-client --yes
```

| Name | Passed as | Required | Default | Type | Notes |
|---|---|---|---|---|---|
| `CLIENT_KEY` | positional | yes | — | `str` | Key identifying the client. |

- **Effect:** Destructive, scope `profile` · **Confirmation:** `--yes`, or answer the prompt at an interactive terminal
- **Preconditions:** Revokes the token for good; anything using it stops working. Needs --yes and --confirm with the exact token key.
- **Id:** `token.revoke` · **Result:** `ClientAppDeleteResult`

---
Source: https://mammoth.io/docs/build/cli/token.md · Updated: 2026-11-02
