문서로 건너뛰기
API

내보내기

이 그룹의 모든 작업: 받는 값, 반환하는 값, 응답할 수 있는 오류.

작업

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

범위threads:read읽기

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.

반환값

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

오류

모든 작업이 반환할 수 있는 오류400401403404422500오류 목록

다른 사용처

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

GET/exports

List the exports

범위threads:read읽기

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.

쿼리 매개변수

limitinteger

Exports per page, 1 to 100.

1 이상100 이하기본값25
offsetinteger

How many exports to skip.

0 이상기본값0

반환값

A page of exports, newest first.

오류

모든 작업이 반환할 수 있는 오류400401403404422500오류 목록

다른 사용처

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

POST/exports

Start an export

범위threads:read데이터 변경
인증 코드 요청

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.

반환값

The export, queued.

오류

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.

모든 작업이 반환할 수 있는 오류400401404422500오류 목록

다른 사용처

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

GET/exports/{id}

Retrieve an export

범위threads:read읽기

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.

경로 매개변수

idstring필수

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

반환값

The export.

오류

모든 작업이 반환할 수 있는 오류400401403404422500오류 목록

다른 사용처

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

GET/exports/{id}/content

Download an export

범위threads:read읽기
인증 코드 요청

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.

경로 매개변수

idstring필수

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

반환값

200binaryapplication/zip

The zip.

오류

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.

모든 작업이 반환할 수 있는 오류400401404422500오류 목록

다른 사용처

SDK
exports.download()
CLI
openemail exports download

객체

Exportobject

objectstring필수
다음 중 하나"export"
idstring필수
statusstring필수
다음 중 하나"queued""running""ready""failed""expired"
phasestring

What it is doing while status is running.

null 가능다음 중 하나"planning""mail""records""finishing"
createdAtstring필수
형식date-time
createdByobject

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

null 가능
namestring
null 가능
emailstring
startedAtstring
null 가능형식date-time
finishedAtstring
null 가능형식date-time
expiresAtstring

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

null 가능형식date-time
sizeBytesinteger
null 가능
fileNamestring
null 가능
threadsDoneinteger
0 이상
threadsTotalinteger
null 가능
errorstring

Why it failed, when status is failed.

null 가능

ExportListobject

objectstring
다음 중 하나"list"
totalinteger

How many exports there are in all.

0 이상
hasMoreboolean

Whether more exports follow this page.

ExportPreviewobject

objectstring필수
다음 중 하나"export_preview"
allowedboolean필수

Whether the caller may export this workspace.

reasonstring필수

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.

null 가능다음 중 하나"not-permitted""mailbox-login""two-factor-required"
nextAvailableAtstring필수

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

null 가능형식date-time
activeExportIdstring필수

The export still being made, if there is one.

null 가능
countsobject필수

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

null 가능
threadsinteger

Conversations.

0 이상
attachmentsinteger

Attachments inside them.

0 이상
attachmentBytesinteger

The size of those attachments, in bytes.

0 이상
deletedFilesinteger

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

0 이상
contactsinteger

Contacts.

0 이상
audiencesinteger

Audiences.

0 이상
calendarEventsinteger

Calendar events.

0 이상
templatesinteger

Templates.

0 이상
rulesinteger

Rules.

0 이상
labelsinteger

Labels.

0 이상
notesinteger

Notes of the caller.

0 이상
addressesinteger

Addresses.

0 이상