Skip to the documentation
API

Exports

Every operation in this group: what it accepts, what it returns and the errors it can answer with.

Operations

A zip of the whole workspace, as the Export page of the app makes it: every conversation as mbox files with its attachments, contacts as vCard, audiences, calendar events as .ics, templates with every version, rules, labels, notes and addresses. An export is made in the background, can be started once a day and is kept for 365 days.

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

GET/exports/preview

See what an export would hold

Scopesthreads:readReads

Whether this 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. 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 app connected with every address. A key or an app limited to particular addresses or domains is a 422 capability_unsupported, and an account the workspace cannot export for is a 403 export_not_permitted.

Requires the threads:read scope.

Returns

What an export would hold, and whether one can start.

Errors

The errors every operation can return400401403404422500Error catalog

Also available in

SDK
exports.preview()
CLI
openemail exports preview
MCP
getExportPreview

GET/exports

List the exports

Scopesthreads:readReads

Every export of the workspace, newest first, with its status and progress. limit and offset page through them, and total counts them all.

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

Requires the threads:read scope.

Query parameters

limitinteger

Exports per page, 1 to 100.

At least 1At most 100Default25
offsetinteger

How many exports to skip.

At least 0Default0

Returns

A page of exports, newest first.

Errors

The errors every operation can return400401403404422500Error catalog

Also available in

SDK
exports.list()
CLI
openemail exports list
MCP
getExportlistExports

POST/exports

Start an export

Scopesthreads:readChanges data
Asks for a verification code

Starts making a zip of the whole workspace, as Export now on the Export page does. It is made in the background: read it with GET /exports/{id} until status is ready, then download it. One export can run 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 app connected with every address. A key or an app limited to particular addresses or domains is a 422 capability_unsupported, and an account the workspace cannot export for is a 403 export_not_permitted.

Requires the threads:read scope.

Returns

The export, queued.

Errors

403

The key lacks the scope, or may not send as that address.

step_up_required: the call was made with an OAuth access token that has not been verified in the last 60 minutes. Ask for a code with POST /security/step-up, send it to POST /security/step-up/verify, then repeat the call. The person can also choose Allow changes for 60 minutes on the app in Account settings, Connected apps, on the OpenEmail website. An API key is never asked for a code.

409

already_running: an export of this workspace is already being made.

429

export_limit_reached: the workspace was exported in the last day.

The errors every operation can return400401404422500Error catalog

Also available in

SDK
exports.start()
CLI
openemail exports start
MCP
startExport

GET/exports/{id}

Retrieve an export

Scopesthreads:readReads

One export, 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 app connected with every address. A key or an app limited to particular addresses or domains is a 422 capability_unsupported, and an account the workspace cannot export for is a 403 export_not_permitted.

Requires the threads:read scope.

Path parameters

idstringRequired

The export id from GET /exports or POST /exports.

Returns

The export.

Errors

The errors every operation can return400401403404422500Error catalog

Also available in

SDK
exports.get()
CLI
openemail exports get
MCP
getExportlistExports

GET/exports/{id}/content

Download an export

Scopesthreads:readReads
Asks for a verification code

The zip itself, as application/zip with its file name in Content-Disposition. It is only there once the export is ready: before that the call is a 409 export_not_ready, and an export older than 365 days is a 409 expired.

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

Requires the threads:read scope.

Path parameters

idstringRequired

The export id from GET /exports or POST /exports.

Returns

200binaryapplication/zip

The zip.

Errors

403

The key lacks the scope, or may not send as that address.

step_up_required: the call was made with an OAuth access token that has not been verified in the last 60 minutes. Ask for a code with POST /security/step-up, send it to POST /security/step-up/verify, then repeat the call. The person can also choose Allow changes for 60 minutes on the app in Account settings, Connected apps, on the OpenEmail website. An API key is never asked for a code.

409

export_not_ready: the export is still being made or failed. expired: it was deleted a year after it was made.

The errors every operation can return400401404422500Error catalog

Also available in

SDK
exports.download()
CLI
openemail exports download

Objects

Exportobject

objectstringRequired
One of"export"
idstringRequired
statusstringRequired
One of"queued""running""ready""failed""expired"
phasestring

What it is doing while status is running.

Can be nullOne of"planning""mail""records""finishing"
createdAtstringRequired
Formatdate-time
createdByobject

Who started it, or null when that account is gone.

Can be null
namestring
Can be null
emailstring
startedAtstring
Can be nullFormatdate-time
finishedAtstring
Can be nullFormatdate-time
expiresAtstring

When the zip is deleted, a year after it was made.

Can be nullFormatdate-time
sizeBytesinteger
Can be null
fileNamestring
Can be null
threadsDoneinteger
At least 0
threadsTotalinteger
Can be null
errorstring

Why it failed, when status is failed.

Can be null

ExportListobject

objectstring
One of"list"
totalinteger

How many exports there are in all.

At least 0
hasMoreboolean

Whether more exports follow this page.

ExportPreviewobject

objectstringRequired
One of"export_preview"
allowedbooleanRequired

Whether the caller may export this workspace.

reasonstringRequired

Why not, when allowed is false: not-permitted for an account that is neither the owner nor holds every permission, mailbox-login for a sign-in for one address, and two-factor-required when the workspace requires two-factor sign-in and the account has none.

Can be nullOne of"not-permitted""mailbox-login""two-factor-required"
nextAvailableAtstringRequired

When the next export can start, or null when one can start now.

Can be nullFormatdate-time
activeExportIdstringRequired

The export still being made, if there is one.

Can be null
countsobjectRequired

How much an export would hold now. Null when allowed is false.

Can be null
threadsinteger

Conversations.

At least 0
attachmentsinteger

Attachments inside them.

At least 0
attachmentBytesinteger

The size of those attachments, in bytes.

At least 0
deletedFilesinteger

Deleted files, listed by name and date but not included.

At least 0
contactsinteger

Contacts.

At least 0
audiencesinteger

Audiences.

At least 0
calendarEventsinteger

Calendar events.

At least 0
templatesinteger

Templates.

At least 0
rulesinteger

Rules.

At least 0
labelsinteger

Labels.

At least 0
notesinteger

Notes of the caller.

At least 0
addressesinteger

Addresses.

At least 0