# API tokens

A person’s own login for scripts.

## mailset tokens list

List your API tokens.

```bash
mailset tokens list
```

With `--json` it prints a list of [API token objects](https://mailset.app/docs/api/tokens#token).

Example:

```bash
mailset tokens list
```

In the API: [POST /v1/tokens.list](https://mailset.app/docs/api/tokens#tokens.list)

## mailset tokens create

Create an API token. It is shown once.

```bash
mailset tokens create <name>
```

### Flags

- `<name>` (argument, required): A name to tell it by, up to 64 characters.

It can ask for your passkey. It prints “This needs your passkey. Open <link>”, then waits until the link is approved or refused. Read its output as it comes: through head or tail, the link shows only after the wait.

With `--json` it prints what [the API returns](https://mailset.app/docs/api/tokens#tokens.create-returns).

Example:

```bash
mailset tokens create "Deploy script"
```

In the API: [POST /v1/tokens.create](https://mailset.app/docs/api/tokens#tokens.create)

## mailset tokens revoke

Revoke an API token.

```bash
mailset tokens revoke <id>
```

### Flags

- `<id>` (argument, required): The token’s id, from `tokens list`.

With `--json` it prints what [the API returns](https://mailset.app/docs/api/tokens#tokens.revoke-returns).

Example:

```bash
mailset tokens revoke d_4b8e2a6c9f1d3057b3e8a2c6
```

In the API: [POST /v1/tokens.revoke](https://mailset.app/docs/api/tokens#tokens.revoke)

---

© 2026 Intenseloop, Inc. Mailset’s site, docs and guides are copyrighted. You may read them and use their code to build with Mailset. Don’t republish them or use them to build a copy of Mailset. Terms: https://mailset.app/terms#content