---
title: "openemail subscriptions"
description: "Every command in this namespace, with its arguments, flags and examples."
url: "https://openemail.uk/docs/cli/reference/subscriptions"
area: "CLI"
category: "Reference"
---

# openemail subscriptions

Every command in this namespace, with its arguments, flags and examples.

## Commands

### `openemail subscriptions list`

List subscriptions

```bash
openemail subscriptions list [flags]
```

Resolves the newsletters and mailing lists the mailbox receives, as the Subscriptions page of the app shows them: one row per sender and the address it writes to, found from the `List-Unsubscribe` header of the mail it sends. Each row says how much mail the sender sent, how much of it is unread and how much arrived in the last 30 days, how it lets you unsubscribe, and the rule that keeps moving its new mail when there is one.

`status` is `active`, the default, or `unsubscribed`. `q` searches the sender, and `sort` is `recent`, `most`, `unread` or `name`. Paging is by `offset`: `total` counts every match and `hasMore` says whether another page follows.

A key limited to particular addresses lists only the subscriptions delivered to them, and `address` narrows the list to one address.

- Scopes: `threads:read`.
- Needs a sign-in.
- Aliases: `ls`.

**Flags**

- `--status <value>` (default `"active"`): `active` or `unsubscribed`. Defaults to `active`.
- `--q <value>`: Searches the sender name and address.
- `--sort <value>` (default `"recent"`): `recent`, `most`, `unread` or `name`. Defaults to `recent`.
- `--limit <n>` (default `50`): Rows per page, 1 to 200, defaulting to 50.
- `--offset <n>` (default `0`): How many rows to skip.
- `--address <value>`: Only the subscriptions delivered to this address.

**Examples**

```bash
openemail subscriptions list
```

With optional flags

```bash
openemail subscriptions list --sort most --limit 20
```

Print the raw JSON

```bash
openemail subscriptions list --json
```

Also available in: API [`GET /subscriptions`](https://openemail.uk/docs/api/reference/subscriptions#get-subscriptions); SDK [`subscriptions.list()`](https://openemail.uk/docs/sdk/reference/subscriptions#list).

### `openemail subscriptions list-domains`

List subscriptions by domain

```bash
openemail subscriptions list-domains [flags]
```

Resolves the same subscriptions as `list`, one row per sender domain with the counts of its senders added up, so a company that writes from several addresses is one row. `unsubscribable` counts the senders on the domain that can be unsubscribed without a person opening a page, which is what `unsubscribeDomain` acts on.

It takes the same filters as `list`.

- Scopes: `threads:read`.
- Needs a sign-in.

**Flags**

- `--status <value>` (default `"active"`): `active` or `unsubscribed`. Defaults to `active`.
- `--q <value>`: Searches the sender name and address.
- `--sort <value>` (default `"recent"`): `recent`, `most`, `unread` or `name`. Defaults to `recent`.
- `--limit <n>` (default `50`): Rows per page, 1 to 200, defaulting to 50.
- `--offset <n>` (default `0`): How many rows to skip.
- `--address <value>`: Only the subscriptions delivered to this address.

**Examples**

```bash
openemail subscriptions list-domains
```

With optional flags

```bash
openemail subscriptions list-domains --sort most
```

Print the raw JSON

```bash
openemail subscriptions list-domains --json
```

Also available in: API [`GET /subscriptions/domains`](https://openemail.uk/docs/api/reference/subscriptions#get-subscriptions-domains); SDK [`subscriptions.listDomains()`](https://openemail.uk/docs/sdk/reference/subscriptions#listDomains).

### `openemail subscriptions unsubscribe`

Unsubscribe from a sender

```bash
openemail subscriptions unsubscribe <id> [flags]
```

Unsubscribes the way the sender asks for it: a one-click request to its unsubscribe address when it offers one, otherwise an unsubscribe email sent from the address the mail arrived at. A sender that only offers a page cannot be unsubscribed by a program, so `method` is `link` and `url` is the page a person has to open. `bin` also moves every conversation from the sender to the Bin.

A sender that gives no way to unsubscribe is a 422 `unsubscribe_unsupported`, and one whose one-click request failed with no address to write to is a 502 `unsubscribe_refused`. A subscription delivered to an address the key does not reach is a 404.

- Scopes: `threads:write`.
- Needs a sign-in.
- Asks you to confirm.

**Arguments**

- `<id>` (required): The subscription, from `list`.

**Flags**

- `--bin` (default `false`): Also move every conversation from the sender to the Bin. Defaults to false.
- `--data <json|@file|->`: The whole `body` as JSON, inline, from a file with @path, or - for standard input. Flags override its keys.

**Examples**

The required values only

```bash
openemail subscriptions unsubscribe sub_7d2c1f0a9b3e4c5d6e7f8a9b
```

With optional flags

```bash
openemail subscriptions unsubscribe sub_7d2c1f0a9b3e4c5d6e7f8a9b --bin
```

Skip the confirmation, for scripts

```bash
openemail subscriptions unsubscribe sub_7d2c1f0a9b3e4c5d6e7f8a9b --yes
```

Also available in: API [`POST /subscriptions/{id}/unsubscribe`](https://openemail.uk/docs/api/reference/subscriptions#post-subscriptions-id-unsubscribe); SDK [`subscriptions.unsubscribe()`](https://openemail.uk/docs/sdk/reference/subscriptions#unsubscribe).

### `openemail subscriptions unsubscribe-domain`

Unsubscribe from a whole domain

```bash
openemail subscriptions unsubscribe-domain <domain> [flags]
```

Unsubscribes from every sender on a domain that can be unsubscribed without a person opening a page, with a one-click request or an unsubscribe email, as the domain view of the Subscriptions page does. `unsubscribed` counts the senders it worked for, `skipped` the senders that only offer a page and `failed` the ones that did not accept it.

`bin` also moves their conversations to the Bin, and `address` keeps it to the subscriptions delivered to one address. A key limited to particular addresses acts only on the subscriptions delivered to them.

- Scopes: `threads:write`.
- Needs a sign-in.
- Asks you to confirm.

**Arguments**

- `<domain>` (required): The sender domain, from `listDomains`.

**Flags**

- `--bin` (default `false`): Also move the conversations to the Bin. Defaults to false.
- `--address <value>`: Only the subscriptions delivered to this address.
- `--data <json|@file|->`: The whole `body` as JSON, inline, from a file with @path, or - for standard input. Flags override its keys.

**Examples**

```bash
openemail subscriptions unsubscribe-domain news.acme.com
```

Skip the confirmation, for scripts

```bash
openemail subscriptions unsubscribe-domain news.acme.com --yes
```

Also available in: API [`POST /subscriptions/domains/{domain}/unsubscribe`](https://openemail.uk/docs/api/reference/subscriptions#post-subscriptions-domains-domain-unsubscribe); SDK [`subscriptions.unsubscribeDomain()`](https://openemail.uk/docs/sdk/reference/subscriptions#unsubscribeDomain).

### `openemail subscriptions move`

Move what a sender sent

```bash
openemail subscriptions move <id> --destination <value> [flags]
openemail subscriptions move <id> --data <json|@file|-> [flags]
```

Moves every conversation from the sender to the archive, the Bin or a label, as the Subscriptions page does. `destination` is `archive`, `bin` or `label`, and `label` needs `--label-id`, or the call is a 422 `label_not_found`.

With `future`, the default, a rule keeps doing it to new mail from the sender to that address, which also needs `rules:write`. `--rule-name` names that rule. `future: false` drops a rule made that way before, when the key holds `rules:write`.

- Scopes: `threads:write`.
- Needs a sign-in.

**Arguments**

- `<id>` (required): The subscription, from `list`.

**Flags**

- `--destination <value>`: `archive`, `bin` or `label`. Required, here or in `--data`.
- `--label-id <value>`: The label to file under, for `label`.
- `--future` (default `true`): Keep doing it to new mail with a rule. Defaults to true.
- `--rule-name <value>`: A name for that rule.
- `--data <json|@file|->`: The whole `body` as JSON, inline, from a file with @path, or - for standard input. Flags override its keys.

**Examples**

```bash
openemail subscriptions move sub_7d2c1f0a9b3e4c5d6e7f8a9b --destination archive
```

Read the whole body from a JSON file

```bash
openemail subscriptions move sub_7d2c1f0a9b3e4c5d6e7f8a9b --data @subscriptions.json
```

Also available in: API [`POST /subscriptions/{id}/move`](https://openemail.uk/docs/api/reference/subscriptions#post-subscriptions-id-move); SDK [`subscriptions.move()`](https://openemail.uk/docs/sdk/reference/subscriptions#move).
