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

# openemail exports

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

## Commands

### `openemail exports preview`

See what an export would hold

```bash
openemail exports preview [flags]
```

Resolves whether the workspace can be exported by the caller now, when the next export can start, the export still being made, if there is one, and how much an export would hold: conversations, attachments and their size, contacts, audiences, calendar events, templates, rules, labels, notes and addresses. When `allowed` is false, `reason` says why and `counts` is null.

Only the workspace owner, or a member whose role holds every permission, can export the workspace: an API key, or an access token connected with every address. A key or token limited to particular addresses or domains is 422 `capability_unsupported`, and an account the workspace cannot export for is 403 `export_not_permitted`.

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

**Examples**

```bash
openemail exports preview
```

Print the raw JSON

```bash
openemail exports preview --json
```

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

### `openemail exports list`

List the exports

```bash
openemail exports list [flags]
```

Resolves every export of the workspace, newest first, a page at a time, with its status, its progress through the conversations and, once it is `ready`, its size, file name and when it is deleted.

Only the workspace owner, or a member whose role holds every permission, can export the workspace: an API key, or an access token connected with every address. A key or token limited to particular addresses or domains is 422 `capability_unsupported`, and an account the workspace cannot export for is 403 `export_not_permitted`.

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

**Flags**

- `--limit <n>` (default `25`): Exports per page, from 1 to 100. The server defaults to 25.
- `--offset <n>` (default `0`): How many exports to skip.

**Examples**

```bash
openemail exports list
```

Print the raw JSON

```bash
openemail exports list --json
```

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

### `openemail exports get`

Retrieve an export

```bash
openemail exports get <id> [flags]
```

Resolves one export: its `status`, `phase` and progress while it is made, and once it is `ready` its size, file name and when it is deleted.

Only the workspace owner, or a member whose role holds every permission, can export the workspace: an API key, or an access token connected with every address. A key or token limited to particular addresses or domains is 422 `capability_unsupported`, and an account the workspace cannot export for is 403 `export_not_permitted`.

- Scopes: `threads:read`.
- Needs a sign-in.
- Aliases: `show`, `view`.

**Arguments**

- `<id>` (required): The export id from `start` or `list`.

**Examples**

```bash
openemail exports get exp_8c1e4a7f2b9d3e6a0c5f1b28
```

Print the raw JSON

```bash
openemail exports get exp_8c1e4a7f2b9d3e6a0c5f1b28 --json
```

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

### `openemail exports start`

Start an export

```bash
openemail exports start [flags]
```

Starts making a zip of the whole workspace, as Export now on the Export page does, and resolves with the export, `queued`. It is made in the background: poll `get` until `status` is `ready`, then `download` it. One export runs at a time, and a workspace can be exported once a day.

Only the workspace owner, or a member whose role holds every permission, can export the workspace: an API key, or an access token connected with every address. A key or token limited to particular addresses or domains is 422 `capability_unsupported`, and an account the workspace cannot export for is 403 `export_not_permitted`.

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

**Examples**

```bash
openemail exports start
```

Print the raw JSON

```bash
openemail exports start --json
```

Also available in: API [`POST /exports`](https://openemail.uk/docs/api/reference/exports#post-exports); SDK [`exports.start()`](https://openemail.uk/docs/sdk/reference/exports#start).

### `openemail exports download`

Download an export

```bash
openemail exports download <id> [flags]
```

Resolves with the zip of a `ready` export, the same file the Download action on the Export page saves.

Only the workspace owner, or a member whose role holds every permission, can export the workspace: an API key, or an access token connected with every address. A key or token limited to particular addresses or domains is 422 `capability_unsupported`, and an account the workspace cannot export for is 403 `export_not_permitted`.

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

**Arguments**

- `<id>` (required): The export id from `start` or `list`.

**Flags**

- `-o, --out <file>`: Write the file here. Required on a terminal. Without it, piped output gets the raw bytes

**Examples**

```bash
openemail exports download exp_8c1e4a7f2b9d3e6a0c5f1b28
```

Save the file

```bash
openemail exports download exp_8c1e4a7f2b9d3e6a0c5f1b28 --out report.pdf
```

Also available in: API [`GET /exports/{id}/content`](https://openemail.uk/docs/api/reference/exports#get-exports-id-content); SDK [`exports.download()`](https://openemail.uk/docs/sdk/reference/exports#download).
