Skip to the documentation
API

Imports

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

Operations

Two ways to bring an existing setup across.

A mailbox import reads an export file: Google Takeout archives, .mbox, .eml, .zip and .tgz. Create the import, upload each file in parts, then start it. Imported mail is quiet, so no rules, forwards, notifications, summaries or webhooks run for it.

A provider import reads an account at Resend, SendGrid, Postmark, Mailgun or Mailchimp with one key: suppressions, lists or segments as audiences, subscribed contacts, templates, and webhooks created switched off, plus a checklist of the domains and API keys to recreate by hand. What comes across depends on the provider, so inspect it first to see what this key would bring. The key is held encrypted only while the import runs and is erased when it ends, and running it twice duplicates nothing.

GET/imports

List mailbox imports

Scopesthreads:readReads

Every import in the workspace, newest first, one page at a time, each with its status, byte progress and running counts. Nothing is dropped from the history, so following nextCursor reaches the first import. A key limited to particular addresses sees only imports into those addresses.

Requires the threads:read scope.

Query parameters

addressIdstring

Only imports into this address.

1 to 128 characters
limitinteger

Rows per page, 1 to 100.

At least 1At most 100Default25
cursorstring

An import id. Keyset, not offset: pass the previous page's nextCursor. One that names nothing in this list is a 400 invalid_cursor.

Returns

A page of imports, newest first, with hasMore and nextCursor.

Errors

The errors every operation can return400401403404422429500Error catalog

Also available in

TypeScript
nextmail.imports.list()nextmail.imports.listAll()nextmail.imports.iterate()
Python
imports.list()imports.list_all()imports.iterate()
Ruby
imports.listimports.list_allimports.iterate
PHP
imports->listimports->listAllimports->iterate
Go
Imports.ListImports.ListAllImports.Iterate
Java
imports().listimports().listAllimports().iterate
C#
Imports.ListAsyncImports.ListAllAsyncImports.IterateAsync
CLI
nextmail imports list
MCP
listImports

POST/imports

Start a mailbox import

Scopesthreads:writeChanges data

Creates an import into one address and returns it with status: uploading. Upload each file in parts of chunkBytes with the chunk operation, then call start. The import reads Google Takeout archives, .mbox, .eml, .zip and .tgz files. Imported mail is quiet: no rules, forwards, notifications, summaries or webhooks run for it.

Requires the threads:write scope.

Request body

addressIdstringRequired

The address the mail belongs to.

1 to 128 characters
filesobject[]Required

Each file as { name, bytes }, 1 to 50 of them, each at most 100 GB.

1 to 50 items
namestringRequired
1 to 255 characters
bytesintegerRequired
At least 1At most 107374182400
optionsobject

keepInbox, includeSpam and includeTrash, as for create.

keepInboxboolean

Default true. Mail that was in the old inbox lands in Inbox with its unread state; false files everything under Archive.

includeSpamboolean

Default false.

includeTrashboolean

Default false.

Returns

The import, waiting for its files.

Errors

The errors every operation can return400401403404422429500Error catalog

Also available in

TypeScript
nextmail.imports.create()nextmail.imports.importFiles()
Python
imports.create()imports.import_files()
Ruby
imports.createimports.import_files
PHP
imports->createimports->importFiles
Go
Imports.CreateImports.ImportFiles
Java
imports().createimports().importFiles
C#
Imports.CreateAsyncImports.ImportFilesAsync
CLI
nextmail imports createnextmail imports import-files

GET/imports/{id}

Get a mailbox import

Scopesthreads:readReads

Status, byte progress and counts. Poll it while the import runs.

Requires the threads:read scope.

Path parameters

idstringRequired

Import id, imp_ followed by 24 hex characters.

Returns

The import.

Errors

The errors every operation can return400401403404422429500Error catalog

Also available in

TypeScript
nextmail.imports.get()
Python
imports.get()
Ruby
imports.get
PHP
imports->get
Go
Imports.Get
Java
imports().get
C#
Imports.GetAsync
CLI
nextmail imports get
MCP
getImport

GET/imports/{id}/upload

Which parts have arrived

Scopesthreads:writeReads

For each file, the indexes of the parts already stored, so an interrupted upload sends only what is missing.

Requires the threads:write scope.

Path parameters

idstringRequired

Import id, imp_ followed by 24 hex characters.

Returns

Received parts per file.

Errors

The errors every operation can return400401403404422429500Error catalog

Also available in

TypeScript
nextmail.imports.uploadState()
Python
imports.upload_state()
Ruby
imports.upload_state
PHP
imports->uploadState
Go
Imports.UploadState
Java
imports().uploadState
C#
Imports.UploadStateAsync
CLI
nextmail imports upload-state

DELETE/imports/{id}/upload

Delete the uploaded files

Scopesthreads:writeDeletes

Removes the uploaded archive. Mail already imported stays in the mailbox. Refused with 409 while the import is queued or running.

Requires the threads:write scope.

Path parameters

idstringRequired

Import id, imp_ followed by 24 hex characters.

Returns

The import, with uploadDeleted: true.

Errors

The errors every operation can return400401403404422429500Error catalog

Also available in

TypeScript
nextmail.imports.deleteUpload()
Python
imports.delete_upload()
Ruby
imports.delete_upload
PHP
imports->deleteUpload
Go
Imports.DeleteUpload
Java
imports().deleteUpload
C#
Imports.DeleteUploadAsync
CLI
nextmail imports delete-upload

PUT/imports/{id}/files/{file}/chunks/{chunk}

Upload one part of a file

Scopesthreads:writeChanges data

Stores bytes chunk * chunkBytes up to the next part of file file. Every part is exactly chunkBytes long except the last. Sending a part again replaces it, so a failed part can simply be retried.

Requires the threads:write scope.

Path parameters

idstringRequired

Import id, imp_ followed by 24 hex characters.

fileintegerRequired

The file index, in the order given to create.

At least 0
chunkintegerRequired

The part index, from 0.

At least 0

Request body

Content typeapplication/octet-stream

binary

Returns

The part was stored.

Errors

The errors every operation can return400401403404422429500Error catalog

Also available in

TypeScript
nextmail.imports.uploadChunk()
Python
imports.upload_chunk()
Ruby
imports.upload_chunk
PHP
imports->uploadChunk
Go
Imports.UploadChunk
Java
imports().uploadChunk
C#
Imports.UploadChunkAsync
CLI
nextmail imports upload-chunk

POST/imports/{id}/start

Start reading the uploaded files

Scopesthreads:writeChanges data

Checks that every part of every file has arrived and queues the import. 412 missing_chunks names the files still incomplete.

Requires the threads:write scope.

Path parameters

idstringRequired

Import id, imp_ followed by 24 hex characters.

Returns

The import, queued.

Errors

The errors every operation can return400401403404422429500Error catalog

Also available in

TypeScript
nextmail.imports.start()
Python
imports.start()
Ruby
imports.start
PHP
imports->start
Go
Imports.Start
Java
imports().start
C#
Imports.StartAsync
CLI
nextmail imports start

POST/imports/{id}/cancel

Cancel a mailbox import

Scopesthreads:writeDeletes

Stops the import at its next checkpoint. Mail already imported stays.

Requires the threads:write scope.

Path parameters

idstringRequired

Import id, imp_ followed by 24 hex characters.

Returns

The import, cancelled.

Errors

The errors every operation can return400401403404422429500Error catalog

Also available in

TypeScript
nextmail.imports.cancel()
Python
imports.cancel()
Ruby
imports.cancel
PHP
imports->cancel
Go
Imports.Cancel
Java
imports().cancel
C#
Imports.CancelAsync
CLI
nextmail imports cancel
MCP
cancelImport

GET/imports/{id}/failures

What an import could not bring across

Scopesthreads:readReads

Each message or archive entry that did not come across, with the reason. Page with after, the nextCursor of the previous page.

Requires the threads:read scope.

Path parameters

idstringRequired

Import id, imp_ followed by 24 hex characters.

Query parameters

afterinteger

The nextCursor of the previous page.

limitinteger

At most 100, the default.

At least 1At most 100

Returns

Failures, in the order they happened.

Errors

The errors every operation can return400401403404422429500Error catalog

Also available in

TypeScript
nextmail.imports.listFailures()
Python
imports.list_failures()
Ruby
imports.list_failures
PHP
imports->listFailures
Go
Imports.ListFailures
Java
imports().listFailures
C#
Imports.ListFailuresAsync
CLI
nextmail imports list-failures
MCP
listImportFailures

POST/provider-imports/inspect

Look inside an account at another provider before importing

Scopessettings:writeReads

Reads the first page of each resource with a key from Resend, SendGrid, Postmark, Mailgun or Mailchimp and returns what an import would bring. resources lists what this key can bring across, and counts holds a count for each. Nothing is stored and the key is not kept. A key that can only send is 400 restricted_key.

Requires the settings:write scope.

Request body

apiKeystringRequired
8 to 200 characters
providerstring
One of"resend""sendgrid""postmark""mailgun""mailchimp"Default"resend"

Returns

What the key can bring, with counts per resource.

Errors

The errors every operation can return400401403404422429500Error catalog

Also available in

TypeScript
nextmail.providerImports.inspect()
Python
provider_imports.inspect()
Ruby
provider_imports.inspect
PHP
providerImports->inspect
Go
ProviderImports.Inspect
Java
providerImports().inspect
C#
ProviderImports.InspectAsync
CLI
nextmail provider-imports inspect

GET/provider-imports

List imports from sending providers

Scopessettings:readReads

Every provider import in the workspace, newest first, one page at a time, each with its report. Follow nextCursor to reach the first one.

Requires the settings:read scope.

Query parameters

limitinteger

Rows per page, 1 to 100.

At least 1At most 100Default25
cursorstring

A provider import id. Keyset, not offset: pass the previous page's nextCursor. One that names nothing in this list is a 400 invalid_cursor.

Returns

A page of provider imports, newest first, with hasMore and nextCursor.

Errors

The errors every operation can return400401403404422429500Error catalog

Also available in

TypeScript
nextmail.providerImports.list()nextmail.providerImports.listAll()nextmail.providerImports.iterate()
Python
provider_imports.list()provider_imports.list_all()provider_imports.iterate()
Ruby
provider_imports.listprovider_imports.list_allprovider_imports.iterate
PHP
providerImports->listproviderImports->listAllproviderImports->iterate
Go
ProviderImports.ListProviderImports.ListAllProviderImports.Iterate
Java
providerImports().listproviderImports().listAllproviderImports().iterate
C#
ProviderImports.ListAsyncProviderImports.ListAllAsyncProviderImports.IterateAsync
CLI
nextmail provider-imports list
MCP
getProviderImportlistProviderImports

POST/provider-imports

Import from another provider

Scopessettings:writeChanges data

Starts an import from Resend, SendGrid, Postmark, Mailgun or Mailchimp: suppressions, lists or segments as audiences, subscribed contacts, templates, and webhooks created switched off, plus a checklist of domains and API keys. A contact who unsubscribed at the provider is not imported and is recorded as unsubscribed here, so GET /suppressions/unsubscribes lists them and adding them later leaves them unsubscribed. Resources the provider has no such thing for, or the key cannot read, are left out, and the import lists what it brings in resources. The key is held encrypted only while the import runs and is erased when it ends. Running it twice duplicates nothing.

Requires the settings:write scope.

Request body

apiKeystringRequired

The key from the other provider, as inspect takes it.

8 to 200 characters
providerstring

One of resend, sendgrid, postmark, mailgun and mailchimp. Defaults to resend.

One of"resend""sendgrid""postmark""mailgun""mailchimp"Default"resend"
resourcesstring[]Required

Any of suppressions, audiences, contacts, templates, webhooks, domains and api-keys.

1 to 7 itemsOne of"suppressions""audiences""contacts""templates""webhooks""domains""api-keys"

Returns

The import, queued.

Errors

The errors every operation can return400401403404422429500Error catalog

Also available in

TypeScript
nextmail.providerImports.create()
Python
provider_imports.create()
Ruby
provider_imports.create
PHP
providerImports->create
Go
ProviderImports.Create
Java
providerImports().create
C#
ProviderImports.CreateAsync
CLI
nextmail provider-imports create

GET/provider-imports/{id}

Get an import from a sending provider

Scopessettings:readReads

Status, current step and the report so far.

Requires the settings:read scope.

Path parameters

idstringRequired

Provider import id, pimp_ followed by 24 hex characters.

Returns

The provider import.

Errors

The errors every operation can return400401403404422429500Error catalog

Also available in

TypeScript
nextmail.providerImports.get()
Python
provider_imports.get()
Ruby
provider_imports.get
PHP
providerImports->get
Go
ProviderImports.Get
Java
providerImports().get
C#
ProviderImports.GetAsync
CLI
nextmail provider-imports get
MCP
getProviderImportlistProviderImports

POST/provider-imports/{id}/cancel

Cancel an import from a sending provider

Scopessettings:writeDeletes

Stops it and erases the key. What already came across stays.

Requires the settings:write scope.

Path parameters

idstringRequired

Provider import id, pimp_ followed by 24 hex characters.

Returns

The provider import, cancelled.

Errors

The errors every operation can return400401403404422429500Error catalog

Also available in

TypeScript
nextmail.providerImports.cancel()
Python
provider_imports.cancel()
Ruby
provider_imports.cancel
PHP
providerImports->cancel
Go
ProviderImports.Cancel
Java
providerImports().cancel
C#
ProviderImports.CancelAsync
CLI
nextmail provider-imports cancel
MCP
cancelProviderImport

GET/imports/mailbox-settings

Find the mail server for an address

Scopesthreads:writeReads

Looks up where the mailbox behind an address lives, so an import can connect to it. It tries the providers Nextmail knows, then who receives mail for the domain, then Mozilla's public list of mail settings, then the domain's own _imaps._tcp record. Nothing is stored and no sign-in is attempted.

server is null when nothing was found: ask for the host and port and pass them to POST /imports/mailbox/check. signIn says what the mailbox takes. An Outlook.com or Microsoft 365 mailbox answers microsoft, which only the Microsoft sign-in on the Migrations page of the app can open.

Requires the threads:write scope.

Query parameters

emailstringRequired

The address of the old mailbox.

Formatemail

Returns

What was found for the address.

Errors

400

mailbox_address_invalid: that is not an email address.

429

mailbox_checks_limited: too many lookups in the last hour.

rate_limited: the key or app made more than 600 requests in 60 seconds. Wait for the seconds in Retry-After.

The errors every operation can return401403404422500Error catalog

Also available in

TypeScript
nextmail.imports.discoverMailbox()
Python
imports.discover_mailbox()
Ruby
imports.discover_mailbox
PHP
imports->discoverMailbox
Go
Imports.DiscoverMailbox
Java
imports().discoverMailbox
C#
Imports.DiscoverMailboxAsync
CLI
nextmail imports discover-mailbox
MCP
discoverMailboxSettings

POST/imports/mailbox/check

Check a mailbox before importing it

Scopesthreads:writeReads

Signs in to the old mailbox over IMAP, lists its folders and counts the messages, then signs out. Nothing is stored, the password is not kept and the old mailbox is not changed. Use it to show what an import would bring before starting one.

Leave host out to have the server looked up from the address. Only port 993 with TLS, or port 143 with STARTTLS, is accepted. Each person may make 10 sign-in attempts an hour across this call, POST /imports/mailbox and POST /imports/{id}/resume, and every refused sign-in reads the same.

Requires the threads:write scope.

Request body

emailstringRequired

The address of the old mailbox.

3 to 320 characters
passwordstringRequired

The password of the old mailbox, or an app password where discoverMailbox answers signIn: app-password.

1 to 1024 characters
hoststring

The IMAP host, such as imap.example.com. It has to be a public host. Left out, the server is looked up from the address.

1 to 253 characters
portinteger

993 or 143, read only with host. Left out, it follows security: 993 for tls and 143 for starttls.

At least 1At most 65535
securitystring

tls or starttls, read only with host. Left out, it follows port, and is tls when both are left out.

One of"tls""starttls"
usernamestring

The name to sign in with. Left out, it is the username that discoverMailbox answers, usually the address.

1 to 320 characters

Returns

The folders found and how many messages they hold.

Errors

400

mailbox_login_failed: the mail server did not accept the address and password, whatever the reason. mailbox_settings_unknown: no server was found for the address, so send host. mailbox_host_not_allowed: the host is not public, or the port is not 993 or 143. mailbox_uses_microsoft: the mailbox only opens through the Microsoft sign-in in the app.

429

mailbox_checks_limited: too many sign-in attempts in the last hour.

rate_limited: the key or app made more than 600 requests in 60 seconds. Wait for the seconds in Retry-After.

502

mailbox_unreachable: the mail server did not answer.

The errors every operation can return401403404422500Error catalog

Also available in

TypeScript
nextmail.imports.checkMailbox()
Python
imports.check_mailbox()
Ruby
imports.check_mailbox
PHP
imports->checkMailbox
Go
Imports.CheckMailbox
Java
imports().checkMailbox
C#
Imports.CheckMailboxAsync
CLI
nextmail imports check-mailbox

POST/imports/mailbox

Import a live mailbox

Scopesthreads:writeChanges data

Starts copying an old mailbox into one address, straight from its mail server. It signs in once to check the password, keeps the password sealed until the import finishes and for 30 days at most, and queues the import. Poll GET /imports/{id} for progress.

The old mailbox is only ever read. Folders become labels, read and starred state come across, and a message the address already holds is skipped, so running an import twice adds nothing. A Gmail mailbox is read from All Mail, with its labels. An import waits by itself when the old provider slows it down, such as Gmail's daily download limit, and carries on from the same folder afterwards: status is parked and remote.resumeAt says when. If the password stops working, status is needs-password until POST /imports/{id}/resume sends a new one.

contacts and calendars bring those across too where the provider offers them, which needs contacts:write and calendar:write as well. rerunOf names a finished import of the same mailbox, at most 30 days old, so only mail that arrived since is fetched. Leave host out on such a run and it connects to the same server as that import. One import may run into an address at a time.

Requires the threads:write scope.

Request body

emailstringRequired

The address of the old mailbox.

3 to 320 characters
passwordstringRequired

The password of the old mailbox, or an app password where discoverMailbox answers signIn: app-password.

1 to 1024 characters
hoststring

The IMAP host, such as imap.example.com. It has to be a public host. Left out, the server is looked up from the address.

1 to 253 characters
portinteger

993 or 143, read only with host. Left out, it follows security: 993 for tls and 143 for starttls.

At least 1At most 65535
securitystring

tls or starttls, read only with host. Left out, it follows port, and is tls when both are left out.

One of"tls""starttls"
usernamestring

The name to sign in with. Left out, it is the username that discoverMailbox answers, usually the address.

1 to 320 characters
addressIdstringRequired

The address the mail belongs to. It must be an address this workspace owns and this key may act for.

1 to 128 characters
optionsobject
keepInboxboolean
includeSpamboolean
includeTrashboolean
contactsboolean

True brings the address book across too, where the provider offers it. Needs contacts:write.

calendarsboolean

True brings the calendars across too, where the provider offers them. Needs calendar:write.

rerunOfstring

The id of a finished import of the same mailbox, at most 30 days old. Only mail that arrived since is fetched.

1 to 64 characters

Returns

The import, with status queued.

Errors

400

mailbox_login_failed: the mail server did not accept the address and password, whatever the reason. mailbox_settings_unknown: no server was found for the address, so send host. mailbox_host_not_allowed: the host is not public, or the port is not 993 or 143. mailbox_uses_microsoft: the mailbox only opens through the Microsoft sign-in in the app.

403

address_not_allowed: the key may not import into that address.

404

address_not_found: that address is not in this workspace.

409

already_running: an import into that address is under way. rerun_not_available: the import named in rerunOf cannot be continued.

429

mailbox_checks_limited: too many sign-in attempts in the last hour.

rate_limited: the key or app made more than 600 requests in 60 seconds. Wait for the seconds in Retry-After.

502

mailbox_unreachable: the mail server did not answer.

The errors every operation can return401422500Error catalog

Also available in

TypeScript
nextmail.imports.connectMailbox()
Python
imports.connect_mailbox()
Ruby
imports.connect_mailbox
PHP
imports->connectMailbox
Go
Imports.ConnectMailbox
Java
imports().connectMailbox
C#
Imports.ConnectMailboxAsync
CLI
nextmail imports connect-mailbox

POST/imports/{id}/resume

Resume a waiting mailbox import

Scopesthreads:writeChanges data

Carries on an import from a live mailbox that is waiting. One with status parked is queued again at once, without a body. One with status needs-password needs the new password, which is checked against the old mailbox before the import is queued. It picks up at the folder and message it stopped at. An import that came from a Microsoft sign-in is resumed by signing in again on the Migrations page.

Requires the threads:write scope.

Path parameters

idstringRequired

Import id, imp_ followed by 24 hex characters.

Request body

passwordstring

The new password of the old mailbox. Required when status is needs-password.

1 to 1024 characters

Returns

The import, queued again.

Errors

400

password_required: the import has status needs-password and no password was sent. mailbox_login_failed: the mail server did not accept the new password, whatever the reason.

404

not_found: no such import.

409

not_resumable: the import is not waiting.

429

mailbox_checks_limited: too many sign-in attempts in the last hour.

rate_limited: the key or app made more than 600 requests in 60 seconds. Wait for the seconds in Retry-After.

502

mailbox_unreachable: the mail server did not answer.

The errors every operation can return401403422500Error catalog

Also available in

TypeScript
nextmail.imports.resume()
Python
imports.resume()
Ruby
imports.resume
PHP
imports->resume
Go
Imports.Resume
Java
imports().resume
C#
Imports.ResumeAsync
CLI
nextmail imports resume

Objects

ImportChunkobject

objectstringRequired
One of"import_chunk"
fileintegerRequired
At least 0
chunkintegerRequired
At least 0
bytesintegerRequired

The bytes stored for this part.

At least 0

ImportFailureListobject

objectstringRequired
One of"list"
dataobject[]Required
idstringRequired
seqintegerRequired
reasonstringRequired
One of"too-large""unparseable""no-date""storage-error""unreadable-entry""encrypted-entry""archive-limit"
subjectstringRequired
Can be null
senderstringRequired
Can be null
messageIdstringRequired
Can be null
sourcestringRequired

The file or archive entry it came from.

Can be null
bytesintegerRequired
Can be null
detailstringRequired
Can be null
createdAtstringRequired
Formatdate-time
nextCursorintegerRequired

Pass it as after for the next page. Null on the last page.

Can be null

ImportUploadobject

objectstringRequired
One of"import_upload"
idstringRequired
statusstringRequired
One of"uploading""queued""running""parked""needs-password""completed""failed""cancelled"
receivedinteger[][]Required

For each file in order, the indexes of the parts already stored.

MailboxCheckobject

objectstringRequired
One of"mailbox_check"
providerstringRequired
One of"gmail""outlook""yahoo""aol""icloud""fastmail""zoho""other"
serverobjectRequired
hoststringRequired

The IMAP host, such as imap.gmail.com.

portintegerRequired

993 for TLS, 143 for STARTTLS.

One of993143
securitystringRequired

How the connection is encrypted.

One of"tls""starttls"
usernamestringRequired
foldersobject[]Required

The folders found, up to 200.

namestringRequired

The folder as the old mailbox shows it.

rolestringRequired

What the folder is for. folder is one of the person's own.

One of"inbox""sent""drafts""spam""trash""archive""all""flagged""important""folder"
messagesintegerRequired
At least 0
includedbooleanRequired

Whether an import with the default options reads it. Spam and bin are read only when asked for.

messagesintegerRequired

Messages in the folders an import would read.

At least 0
contactsbooleanRequired
calendarsbooleanRequired

MailboxImportobject

objectstringRequired
One of"import"
idstringRequired
sourcestringRequired

file reads uploaded files, imap reads a live mailbox with a password, and microsoft reads an Outlook mailbox after a Microsoft sign-in.

One of"file""imap""microsoft"
remoteobjectRequired

Set on an import from a live mailbox, null on an import from files.

Can be null
providerstringRequired
One of"gmail""outlook""yahoo""aol""icloud""fastmail""zoho""other"
hoststringRequired
usernamestringRequired
foldersTotalintegerRequired
At least 0
foldersDoneintegerRequired
At least 0
messagesTotalintegerRequired

Messages in the folders being read.

At least 0
pauseReasonstringRequired

Why the import waits. daily-limit and throttled resume by themselves at resumeAt, unreachable retries, and sign-in needs a new password.

Can be nullOne of"throttled""daily-limit""unreachable""sign-in"
resumeAtstringRequired
Can be nullFormatdate-time
rerunOfstringRequired

The earlier import this one continues from.

Can be null
rerunnablebooleanRequired

Whether a new import may name this one in rerunOf to fetch only newer mail.

childrenobject[]Required

The calendar and contacts imports that came with this one. Empty in a list: read one import to see them.

idstringRequired
kindstringRequired
One of"calendar""contacts"
sourcestringRequired
One of"file""takeout""caldav""carddav""microsoft"
statusstringRequired
One of"uploading""queued""running""completed""failed""cancelled""undone"
importedintegerRequired
At least 0
skippedintegerRequired
At least 0
totalintegerRequired
At least 0
addressIdstringRequired

Null once the address was deleted.

Can be null
addressstringRequired
Formatemail
statusstringRequired
One of"uploading""queued""running""parked""needs-password""completed""failed""cancelled"
optionsobjectRequired
keepInboxbooleanRequired
includeSpambooleanRequired
includeTrashbooleanRequired
filesobject[]Required
namestringRequired
bytesintegerRequired
At least 1
chunksintegerRequired

How many parts of chunkBytes it is sent in.

At least 1
formatsstring[]Required

The kinds of export recognised in the files so far.

One of"gmail""openemail""thunderbird""proton""mbox""eml""imap""microsoft"
chunkBytesintegerRequired

The size of every part but the last.

At least 1
totalBytesintegerRequired
At least 0
processedBytesintegerRequired
At least 0
countsobjectRequired
seenintegerRequired
At least 0
importedintegerRequired
At least 0
duplicateintegerRequired
At least 0
filteredintegerRequired
At least 0
failedintegerRequired
At least 0
threadsintegerRequired
At least 0
labelsCreatedstring[]Required
labelsSkippedstring[]Required
lastErrorstringRequired
Can be null
uploadDeletedbooleanRequired
createdAtstringRequired
Formatdate-time
startedAtstringRequired
Can be nullFormatdate-time
finishedAtstringRequired
Can be nullFormatdate-time

MailboxImportListobject

objectstring
One of"list"
hasMoreboolean

True when another page follows. Pass nextCursor back as cursor to read it.

nextCursorstring

An opaque cursor for the next page, or null on the last page. Pass it back unchanged.

Can be null

MailboxSettingsobject

objectstringRequired
One of"mailbox_settings"
emailstringRequired

The address looked up, lower-cased.

Formatemail
providerstringRequired

The provider the address belongs to, or other.

One of"gmail""outlook""yahoo""aol""icloud""fastmail""zoho""other"
signInstringRequired

app-password and password are taken by the mailbox calls. microsoft means the mailbox only opens through the Microsoft sign-in on the Migrations page.

One of"app-password""password""microsoft"
serverobjectRequired

Where to connect, or null when nothing was found and the host has to be given.

Can be null
hoststringRequired

The IMAP host, such as imap.gmail.com.

portintegerRequired

993 for TLS, 143 for STARTTLS.

One of993143
securitystringRequired

How the connection is encrypted.

One of"tls""starttls"
sourcestringRequired

Where the settings came from.

Can be nullOne of"preset""mx""autoconfig""srv""given"
usernamestringRequired

The name to sign in with, usually the address.

contactsbooleanRequired

Whether contacts can come across too.

calendarsbooleanRequired

Whether calendars can come across too.

ProviderImportobject

objectstringRequired
One of"provider_import"
idstringRequired
providerstringRequired
One of"resend""sendgrid""postmark""mailgun""mailchimp"
statusstringRequired
One of"queued""running""completed""failed""cancelled"
resourcesstring[]Required
One of"suppressions""audiences""contacts""templates""webhooks""domains""api-keys"
stepstringRequired

The resource being read now.

Can be nullOne of"suppressions""audiences""contacts""templates""webhooks""domains""api-keys"
reportobjectRequired
suppressionsobjectRequired
addedintegerRequired
skippedintegerRequired
audiencesobjectRequired
createdintegerRequired
reusedintegerRequired
skippedstring[]Required
contactsobjectRequired
addedintegerRequired
createdintegerRequired
unsubscribedintegerRequired
templatesobjectRequired
createdintegerRequired
skippedobject[]Required
namestringRequired
reasonstringRequired
warningsstring[]Required
webhooksobjectRequired
createdintegerRequired
skippedobject[]Required
namestringRequired
reasonstringRequired
droppedEventsstring[]Required
domainsobject[]Required

The domains to set up here by hand, with the records each needs.

namestringRequired
statestringRequired
One of"absent""added""verified"
recordsobject[]Required
typestringRequired
namestringRequired
valuestringRequired
apiKeysobject[]Required

The API keys to recreate here by hand.

namestringRequired
createdAtstringRequired
Can be nullFormatdate-time
lastUsedAtstringRequired
Can be nullFormatdate-time
lastErrorstringRequired
Can be null
createdAtstringRequired
Formatdate-time
startedAtstringRequired
Can be nullFormatdate-time
finishedAtstringRequired
Can be nullFormatdate-time

ProviderImportListobject

objectstring
One of"list"
hasMoreboolean

True when another page follows. Pass nextCursor back as cursor to read it.

nextCursorstring

An opaque cursor for the next page, or null on the last page. Pass it back unchanged.

Can be null

ProviderInventoryobject

objectstringRequired
One of"provider_inventory"
providerstringRequired
One of"resend""sendgrid""postmark""mailgun""mailchimp"
resourcesstring[]Required

What this key can bring across.

One of"suppressions""audiences""contacts""templates""webhooks""domains""api-keys"
countsRecord<string, object>Required

For each resource, how many the first page held and whether more follow.