---
title: "Exports"
description: "A zip of the whole workspace."
url: "https://nextmail.sh/docs/mcp/tools/exports"
area: "MCP server"
category: "Tools"
---

# Exports

A zip of the whole workspace.

## Exports tools

| Tool | What it does |
| --- | --- |
| getExportPreview | Whether an export can start now, when the next one can, the export still being made and how much an export would hold. |
| listExports | The exports of the workspace, newest first, with their status, progress and size. |
| getExport | One export by its id. |
| startExport | Start making a zip of the whole workspace, once a day. It asks for a verification code, and in the app’s chat it always asks first. |

> Only the workspace owner, or a member whose role holds every permission, can export, through a client connected with every address. Every tool needs the read permission of everything an export holds: `threads:read`, `emails:read`, `drafts:read`, `files:read`, `labels:read`, `contacts:read`, `audiences:read`, `calendar:read`, `templates:read` and `rules:read`.

> No tool returns the zip. Download it on the Export page of the app, with `GET /exports/{id}/content` on the REST API, `exports.download` in the SDK or `nextmail exports download` on the command line.

> Some tools on this server make a change the REST API guards with a verification code, and ask for the same code. Until the client has verified a code in the last 60 minutes, or the person has chosen Allow changes for 60 minutes on it in Account → Connected apps, such a tool answers with a result that starts `Refused (step_up_required):` and changes nothing. `emptyAudience` never asks for a code. The API Authentication page lists every tool that asks, and shows how to ask for a code and verify it.

## Reference

### `getExportPreview`

Whether this workspace can be exported now, when the next export can start, the export still being made, and how much an export would hold: conversations, attachments, contacts, audiences, calendar events, templates, rules, labels, notes and addresses.

- Scopes: `threads:read`, `emails:read`, `drafts:read`, `files:read`, `labels:read`, `contacts:read`, `audiences:read`, `calendar:read`, `templates:read`, `rules:read`.
- The app's assistant runs it without asking.
- Toolkit: `workspace`.

**Inputs**

Takes no input.

Also available in: API [`GET /exports/preview`](https://nextmail.sh/docs/api/reference/exports#get-exports-preview); TypeScript [`nextmail.exports.preview()`](https://nextmail.sh/docs/sdk/reference/exports#preview); Python [`exports.preview()`](https://nextmail.sh/docs/python/reference/exports#preview); Ruby [`exports.preview`](https://nextmail.sh/docs/ruby/reference/exports#preview); PHP [`exports->preview`](https://nextmail.sh/docs/php/reference/exports#preview); Go [`Exports.Preview`](https://nextmail.sh/docs/go/reference/exports#preview); Java [`exports().preview`](https://nextmail.sh/docs/java/reference/exports#preview); C# [`Exports.PreviewAsync`](https://nextmail.sh/docs/csharp/reference/exports#preview).

### `listExports`

The exports of this workspace, newest first, with their status, progress, size and when each is deleted. A ready one is downloaded on the Export page of the app or with GET /exports/{id}/content on the REST API.

- Scopes: `threads:read`, `emails:read`, `drafts:read`, `files:read`, `labels:read`, `contacts:read`, `audiences:read`, `calendar:read`, `templates:read`, `rules:read`.
- The app's assistant runs it without asking.
- Toolkit: `workspace`.

**Inputs**

- `limit` (`integer`, at least 1, at most 100)
- `offset` (`integer`, at least 0)

Also available in: API [`GET /exports`](https://nextmail.sh/docs/api/reference/exports#get-exports), [`GET /exports/{id}`](https://nextmail.sh/docs/api/reference/exports#get-exports-id); TypeScript [`nextmail.exports.list()`](https://nextmail.sh/docs/sdk/reference/exports#list), [`nextmail.exports.get()`](https://nextmail.sh/docs/sdk/reference/exports#get); Python [`exports.list()`](https://nextmail.sh/docs/python/reference/exports#list), [`exports.get()`](https://nextmail.sh/docs/python/reference/exports#get); Ruby [`exports.list`](https://nextmail.sh/docs/ruby/reference/exports#list), [`exports.get`](https://nextmail.sh/docs/ruby/reference/exports#get); PHP [`exports->list`](https://nextmail.sh/docs/php/reference/exports#list), [`exports->get`](https://nextmail.sh/docs/php/reference/exports#get); Go [`Exports.List`](https://nextmail.sh/docs/go/reference/exports#list), [`Exports.Get`](https://nextmail.sh/docs/go/reference/exports#get); Java [`exports().list`](https://nextmail.sh/docs/java/reference/exports#list), [`exports().get`](https://nextmail.sh/docs/java/reference/exports#get); C# [`Exports.ListAsync`](https://nextmail.sh/docs/csharp/reference/exports#list), [`Exports.GetAsync`](https://nextmail.sh/docs/csharp/reference/exports#get).

### `getExport`

One export by its id: its status, its progress through the conversations, its size and when it is deleted.

- Scopes: `threads:read`, `emails:read`, `drafts:read`, `files:read`, `labels:read`, `contacts:read`, `audiences:read`, `calendar:read`, `templates:read`, `rules:read`.
- The app's assistant runs it without asking.
- Toolkit: `workspace`.

**Inputs**

- `id` (`string`, required, 1 to 128 characters)

Also available in: API [`GET /exports`](https://nextmail.sh/docs/api/reference/exports#get-exports), [`GET /exports/{id}`](https://nextmail.sh/docs/api/reference/exports#get-exports-id); TypeScript [`nextmail.exports.list()`](https://nextmail.sh/docs/sdk/reference/exports#list), [`nextmail.exports.get()`](https://nextmail.sh/docs/sdk/reference/exports#get); Python [`exports.list()`](https://nextmail.sh/docs/python/reference/exports#list), [`exports.get()`](https://nextmail.sh/docs/python/reference/exports#get); Ruby [`exports.list`](https://nextmail.sh/docs/ruby/reference/exports#list), [`exports.get`](https://nextmail.sh/docs/ruby/reference/exports#get); PHP [`exports->list`](https://nextmail.sh/docs/php/reference/exports#list), [`exports->get`](https://nextmail.sh/docs/php/reference/exports#get); Go [`Exports.List`](https://nextmail.sh/docs/go/reference/exports#list), [`Exports.Get`](https://nextmail.sh/docs/go/reference/exports#get); Java [`exports().list`](https://nextmail.sh/docs/java/reference/exports#list), [`exports().get`](https://nextmail.sh/docs/java/reference/exports#get); C# [`Exports.ListAsync`](https://nextmail.sh/docs/csharp/reference/exports#list), [`Exports.GetAsync`](https://nextmail.sh/docs/csharp/reference/exports#get).

### `startExport`

Start making a zip of the whole workspace, as Export now on the Export page does. It is made in the background, one at a time and once a day, and kept for a year. Ask the person first.

- Scopes: `threads:read`, `emails:read`, `drafts:read`, `files:read`, `labels:read`, `contacts:read`, `audiences:read`, `calendar:read`, `templates:read`, `rules:read`.
- The app's assistant always asks first.
- Asks for a verification code, the same as [`POST /exports`](https://nextmail.sh/docs/api/reference/exports#post-exports).
- Toolkit: `workspace`.

**Inputs**

Takes no input.

Also available in: API [`POST /exports`](https://nextmail.sh/docs/api/reference/exports#post-exports); TypeScript [`nextmail.exports.start()`](https://nextmail.sh/docs/sdk/reference/exports#start); Python [`exports.start()`](https://nextmail.sh/docs/python/reference/exports#start); Ruby [`exports.start`](https://nextmail.sh/docs/ruby/reference/exports#start); PHP [`exports->start`](https://nextmail.sh/docs/php/reference/exports#start); Go [`Exports.Start`](https://nextmail.sh/docs/go/reference/exports#start); Java [`exports().start`](https://nextmail.sh/docs/java/reference/exports#start); C# [`Exports.StartAsync`](https://nextmail.sh/docs/csharp/reference/exports#start).
