Skip to the documentation
CLI

nextmail exports

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

Commands

A zip of the whole workspace, as the Export page makes it: see what it would hold, start one, follow it while it is made and download it once it is ready.

Every command here also takes the global flags, such as --json, --profile and --dry-run. See the global flags

openemail exports preview

See what an export would hold

Scopesthreads:reademails:readdrafts:readfiles:readlabels:readcontacts:readaudiences:readcalendar:readtemplates:readrules:readNeeds a sign-in

Usage

nextmail 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. An export holds all of it, so the key or the token needs the read scope of everything inside: threads:read, emails:read, drafts:read, files:read, labels:read, contacts:read, audiences:read, calendar:read, templates:read and rules:read. 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.

Examples

nextmail exports preview
Print the raw JSON
nextmail exports preview --json

Also available in

API
GET /exports/preview
TypeScript
nextmail.exports.preview()
Python
exports.preview()
Ruby
exports.preview
PHP
exports->preview
Go
Exports.Preview
Java
exports().preview
C#
Exports.PreviewAsync

openemail exports list

List the exports

Scopesthreads:reademails:readdrafts:readfiles:readlabels:readcontacts:readaudiences:readcalendar:readtemplates:readrules:readNeeds a sign-inAliasesls

Usage

nextmail 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. An export holds all of it, so the key or the token needs the read scope of everything inside: threads:read, emails:read, drafts:read, files:read, labels:read, contacts:read, audiences:read, calendar:read, templates:read and rules:read. 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.

Flags

--limit <n>

Exports per page, from 1 to 100. The server defaults to 25.

Default25
--offset <n>

How many exports to skip.

Default0

Examples

nextmail exports list
Print the raw JSON
nextmail exports list --json

Also available in

API
GET /exports
TypeScript
nextmail.exports.list()
Python
exports.list()
Ruby
exports.list
PHP
exports->list
Go
Exports.List
Java
exports().list
C#
Exports.ListAsync

openemail exports get

Retrieve an export

Scopesthreads:reademails:readdrafts:readfiles:readlabels:readcontacts:readaudiences:readcalendar:readtemplates:readrules:readNeeds a sign-inAliasesshowview

Usage

nextmail 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. An export holds all of it, so the key or the token needs the read scope of everything inside: threads:read, emails:read, drafts:read, files:read, labels:read, contacts:read, audiences:read, calendar:read, templates:read and rules:read. 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.

Arguments

<id>Required

The export id from start or list.

Examples

nextmail exports get exp_8c1e4a7f2b9d3e6a0c5f1b28
Print the raw JSON
nextmail exports get exp_8c1e4a7f2b9d3e6a0c5f1b28 --json

Also available in

API
GET /exports/{id}
TypeScript
nextmail.exports.get()
Python
exports.get()
Ruby
exports.get
PHP
exports->get
Go
Exports.Get
Java
exports().get
C#
Exports.GetAsync

openemail exports start

Start an export

Scopesthreads:reademails:readdrafts:readfiles:readlabels:readcontacts:readaudiences:readcalendar:readtemplates:readrules:readNeeds a sign-in

Usage

nextmail 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. An export holds all of it, so the key or the token needs the read scope of everything inside: threads:read, emails:read, drafts:read, files:read, labels:read, contacts:read, audiences:read, calendar:read, templates:read and rules:read. 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.

Examples

nextmail exports start
Print the raw JSON
nextmail exports start --json

Also available in

API
POST /exports
TypeScript
nextmail.exports.start()
Python
exports.start()
Ruby
exports.start
PHP
exports->start
Go
Exports.Start
Java
exports().start
C#
Exports.StartAsync

openemail exports download

Download an export

Scopesthreads:reademails:readdrafts:readfiles:readlabels:readcontacts:readaudiences:readcalendar:readtemplates:readrules:readNeeds a sign-in

Usage

nextmail 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. An export holds all of it, so the key or the token needs the read scope of everything inside: threads:read, emails:read, drafts:read, files:read, labels:read, contacts:read, audiences:read, calendar:read, templates:read and rules:read. 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.

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

nextmail exports download exp_8c1e4a7f2b9d3e6a0c5f1b28
Save the file
nextmail exports download exp_8c1e4a7f2b9d3e6a0c5f1b28 --out report.pdf

Also available in

API
GET /exports/{id}/content
TypeScript
nextmail.exports.download()
Python
exports.download()
Ruby
exports.download
PHP
exports->download
Go
Exports.Download
Java
exports().download
C#
Exports.DownloadAsync