Imports and exports — K8 HQ Content API
Imports and exports operations for K8 HQ Content API. Requests, permissions and responses.
Version 1OpenAPI description (JSON)
Before making requests, read the authentication and request requirements.
Import, export and monitor mailbox transfer jobs.
Base URL
| Base URL | For |
https://api.k8hq.com/v1 | API tokens and the K8 HQ web app |
Endpoints
Imports and exports
Export mail (mbox)
POST/inboxes/{inbox}/exports
Starts an export of every folder of the inbox as an mbox file (a message in two folders is in both, as mail apps show it; flags in the Status, X-Status and X-Keywords headers mail apps read), in one zip with a folder per level (Clients/Smith.mbox). It runs in the background; when it's ready the person gets a notice, and downloads it (/download) within 7 days. It reads every message decrypted, so it takes a person who used their passkey in the last 5 minutes (else 401 step_up_required). People only: a person signed in to the web app, never an access token or an assistant (403). Not for zero-access inboxes (403 zero_access): K8 HQ's servers can't read their mail, so imports and exports happen on the person's own device there. Billed: each message (exports.messages), the zip's storage for 7 days (exports.storage.mb_day) and each download (exports.data_out.kb). It never needs credit, so an owner can always take their mail out: while the organization is out of credit, K8 HQ pays for its exports. Then each inbox may be exported once every 7 days (429 until the next is allowed; an export is kept 7 days, and K8 HQ staff can clear the limit for an export that failed). The zip also contains signatures.json with address signatures and image metadata, and signature-images/ with each image once. Signatures stay readable metadata even for zero-access inboxes; their mail export still follows the inbox privacy rules.
For the web app.
Parameters
| Name | Type | Description |
inbox (path) required | string | Inbox ID (ibx_…). |
Idempotency-Key (header) | string | Up to 255 characters; a retry with the same key gets the first response. |
Response body (JSON)
| Field | Type | Description |
createdAt required | string | |
id required | string | The job (job_). |
kind required | import | export | |
progress required | object | Counts so far. Imports: while counting, estMessages and estBytes; then imported, duplicates (already in the folder, skipped), deleted (marked deleted in the file, skipped), failed (not messages, over 40 MB, or refused), notStored (of failed, the ones the store refused after several tries: importing the same files again adds them), filesFailed (files or zipped mailboxes that aren't mbox), bytesDone and bytesTotal (of the uploaded files). Exports: messages, folders, failed (messages that couldn't be read), and size (the zip, once it's ready). |
status required | scanning | scanned | queued | running | waiting | succeeded | failed | cancelled | Imports first: scanning while their files are counted, scanned once the estimate is ready (start or cancel it). Then queued, running; waiting: an attempt failed and it carries on shortly from where it stopped. failed: it stopped for good; K8 HQ staff are told, and messages imported before it stopped stay. |
costSoFar | string | Started imports: what they've been charged so far (the upload and each message stored; storage comes daily, as for all mail). |
creditOk | boolean | Counted imports: the organization's available credit covers the estimate (else starting it is refused). |
estimate | object | Imports: what it's expected to cost, from the count, rounded up to the cent: import once (every charge the import makes: the upload, each new message stored and indexed for search, and the check for messages already there), storagePerMonth while the mail is kept, total the two. Messages already in their folders are skipped and cost only that check. |
expiresAt | string | Exports: until when it can be downloaded (7 days after it's ready). |
files | string[] | Imports: the uploaded files' names. |
finishedAt | string | |
folder | string | Imports: the folder their messages go to (empty: INBOX), unless keepFolders. |
keepFolders | boolean | Imports: each file's (or zipped mailbox's) own name is its folder. |
upload | string | Imports: their upload (upl_), to start or cancel it. |
Responses
| Status | Body | Meaning |
| 201 | Transfer | The export. |
| 401 | application/problem+json | No token, or it expired: sign in again (unauthenticated). |
| 403 | application/problem+json | The token lacks the scope (scope_missing), the container is zero-access (zero_access), or the caller may not use this operation (forbidden). |
| 404 | application/problem+json | Not found, or not yours (not_found). |
| 409 | application/problem+json | The organization already runs two imports or exports (conflict), or the same Idempotency-Key is still running (in_progress). |
| 426 | application/problem+json | K8 HQ has been updated. Reload this page. |
| 429 | application/problem+json | Too many requests (rate_limited). The token is paused until midnight UTC if it goes over its daily request or download limit, or reaches its daily recipient limit. A message with more recipients than the token has left today is refused. If the token has some recipients left, you can send to fewer. Too many attempts with a wrong token also return this response. |
| 503 | application/problem+json | Temporary failure; try again (unavailable). |
Download an app export in chunks
GET/inboxes/{inbox}/exports/{job}/download
Requires an app access token with content.read and current inbox access, from the connection that started the export. Returns sealed mail in a zip, without a download link. Request one closed byte Range of at most 8 MiB. After the first chunk, send its ETag as If-Match. Each paid chunk, rounded up to a KB, counts against the export connection's original app spending limit and the organization limit before K8 HQ reads it. Repeated or overlapping ranges count again. At most ten whole archives of bytes may be downloaded within seven days.
For API tokens.
Parameters
| Name | Type | Description |
inbox (path) required | string | Inbox ID (ibx_…). |
job (path) required | string | The import or export (job_). |
Range (header) required | string | |
If-Match (header) | string | The first chunk's strong ETag; required for continuation. |
Responses
| Status | Body | Meaning |
| 206 | application/zip | A chunk of the sealed archive. |
| 400 | application/problem+json | Invalid range or version headers. |
| 401 | application/problem+json | No token, or it expired: sign in again (unauthenticated). |
| 402 | application/problem+json | The organization or app monthly spending limit is missing or used up (monthly_budget). |
| 403 | application/problem+json | The token lacks the scope (scope_missing), the container is zero-access (zero_access), or the caller may not use this operation (forbidden). |
| 404 | application/problem+json | Not found, or not yours (not_found). |
| 412 | application/problem+json | The sealed archive changed; restart from its first chunk. |
| 416 | application/problem+json | The range is outside the archive or exceeds 8 MiB. |
| 426 | application/problem+json | K8 HQ has been updated. Reload this page. |
| 428 | application/problem+json | Send the first chunk's ETag in If-Match for continuation. |
| 429 | application/problem+json | Too many requests (rate_limited). The token is paused until midnight UTC if it goes over its daily request or download limit, or reaches its daily recipient limit. A message with more recipients than the token has left today is refused. If the token has some recipients left, you can send to fewer. Too many attempts with a wrong token also return this response. |
| 503 | application/problem+json | Temporary failure; try again (unavailable). |
Download an export
POST/inboxes/{inbox}/exports/{job}/download
A link to the finished export's zip, for the person who asked for it, valid for 5 minutes: open it to download. It takes a recent passkey (else 401 step_up_required). Each link counts the whole zip as downloaded; at most 10 links an export.
For the web app.
Parameters
| Name | Type | Description |
inbox (path) required | string | Inbox ID (ibx_…). |
job (path) required | string | The import or export (job_). |
Response body (JSON)
| Field | Type | Description |
expiresAt required | string | |
size required | integer | The zip's bytes. |
url required | string | |
Responses
| Status | Body | Meaning |
| 200 | JSON | The link. |
| 401 | application/problem+json | No token, or it expired: sign in again (unauthenticated). |
| 403 | application/problem+json | The token lacks the scope (scope_missing), the container is zero-access (zero_access), or the caller may not use this operation (forbidden). |
| 404 | application/problem+json | Not found, or not yours (not_found). |
| 409 | application/problem+json | The export isn't ready, or it expired (conflict). |
| 426 | application/problem+json | K8 HQ has been updated. Reload this page. |
| 429 | application/problem+json | Too many requests (rate_limited). The token is paused until midnight UTC if it goes over its daily request or download limit, or reaches its daily recipient limit. A message with more recipients than the token has left today is refused. If the token has some recipients left, you can send to fewer. Too many attempts with a wrong token also return this response. |
| 503 | application/problem+json | Temporary failure; try again (unavailable). |
Upload mail to import (mbox)
POST/inboxes/{inbox}/imports
Starts an import of mbox files into the inbox: up to 50 files and 10 GB in all, each an mbox file (.mbox, Apple Mail's NAME.mbox/mbox, Thunderbird's folder files) or a zip of them (Apple Mail's exported .mbox folders, compressed in Finder). The answer splits each file into parts: get URLs for them (/parts), PUT each part's bytes (exactly its size) straight to its URL, then /scan: the files' messages are counted and the person sees the estimate (status scanned, estimate), then /start or /cancel. Nothing is imported or billed before /start. People only: a person signed in to the web app, never an access token or an assistant (403). Not for zero-access inboxes (403 zero_access): K8 HQ's servers can't read their mail, so imports and exports happen on the person's own device there. It needs what changing the inbox's messages needs (a person's access). An organization may start 20 uploads a day and run two imports or exports at once (409). Billed: the upload (imports.upload.mb), when it starts, then each message stored (imports.messages) and its storage.
For the web app.
Parameters
| Name | Type | Description |
inbox (path) required | string | Inbox ID (ibx_…). |
Idempotency-Key (header) | string | Up to 255 characters; a retry with the same key gets the first response. |
Request body (JSON)
| Field | Type | Description |
files required | object[] | |
folder | string | The folder every message goes to: an existing one's name (case ignored; mail apps' names find the system folders: Sent Items is Sent) or a new one (/ between levels). Empty: INBOX. |
keepFolders | boolean | Each file's or zipped mailbox's own name is its folder instead (Inbox.mbox to INBOX, Clients.mbox/Smith.mbox/mbox to Clients/Smith). |
markRead | boolean | Mark every message read (for files that don't keep read state). |
{"files":[{"name":"Inbox.mbox","size":52428800}],"keepFolders":true}
Response body (JSON)
| Field | Type | Description |
expiresAt required | string | Start it before then (a part waits a day at most). |
files required | object[] | |
id required | string | The upload (upl_). |
maxBytes required | integer | The most one import may upload. |
Responses
| Status | Body | Meaning |
| 201 | Upload | The upload, and each file's parts. |
| 400 | application/problem+json | The request is malformed (invalid). |
| 401 | application/problem+json | No token, or it expired: sign in again (unauthenticated). |
| 402 | application/problem+json | The organization is out of credit (out_of_credit). Or the organization is read-only (read_only): out of credit for 60 days, so nothing can be changed until an owner adds credit. |
| 403 | application/problem+json | The token lacks the scope (scope_missing), the container is zero-access (zero_access), or the caller may not use this operation (forbidden). |
| 404 | application/problem+json | Not found, or not yours (not_found). |
| 409 | application/problem+json | The organization already runs two imports or exports (conflict), or the same Idempotency-Key is still running (in_progress). |
| 413 | application/problem+json | The files add up to more than one import may upload (too_large). |
| 426 | application/problem+json | K8 HQ has been updated. Reload this page. |
| 429 | application/problem+json | Too many requests (rate_limited). The token is paused until midnight UTC if it goes over its daily request or download limit, or reaches its daily recipient limit. A message with more recipients than the token has left today is refused. If the token has some recipients left, you can send to fewer. Too many attempts with a wrong token also return this response. |
| 503 | application/problem+json | Temporary failure; try again (unavailable). |
Cancel an import before it starts
POST/inboxes/{inbox}/imports/{upload}/cancel
Drops an import that hasn't started (uploading, counting or counted): its count stops, its uploaded files are deleted, and nothing is billed. Cancelling again is fine. People only: a person signed in to the web app, never an access token or an assistant (403). Not for zero-access inboxes (403 zero_access): K8 HQ's servers can't read their mail, so imports and exports happen on the person's own device there.
For the web app.
Parameters
| Name | Type | Description |
inbox (path) required | string | Inbox ID (ibx_…). |
upload (path) required | string | The upload (upl_). |
Responses
| Status | Body | Meaning |
| 204 | | Cancelled. |
| 401 | application/problem+json | No token, or it expired: sign in again (unauthenticated). |
| 403 | application/problem+json | The token lacks the scope (scope_missing), the container is zero-access (zero_access), or the caller may not use this operation (forbidden). |
| 404 | application/problem+json | Not found, or not yours (not_found). |
| 409 | application/problem+json | The import has started (conflict). |
| 426 | application/problem+json | K8 HQ has been updated. Reload this page. |
| 429 | application/problem+json | Too many requests (rate_limited). The token is paused until midnight UTC if it goes over its daily request or download limit, or reaches its daily recipient limit. A message with more recipients than the token has left today is refused. If the token has some recipients left, you can send to fewer. Too many attempts with a wrong token also return this response. |
| 503 | application/problem+json | Temporary failure; try again (unavailable). |
Get URLs for parts of an upload
POST/inboxes/{inbox}/imports/{upload}/parts
Presigned URLs for some parts of one of the upload's files, each valid for 15 minutes and for that part's exact size only: PUT the part's bytes to it, with nothing else. Ask for up to 20 at a time, as the upload goes; ask again for a part whose PUT failed. People only: a person signed in to the web app, never an access token or an assistant (403). Not for zero-access inboxes (403 zero_access): K8 HQ's servers can't read their mail, so imports and exports happen on the person's own device there.
For the web app.
Parameters
| Name | Type | Description |
inbox (path) required | string | Inbox ID (ibx_…). |
upload (path) required | string | The upload (upl_). |
Request body (JSON)
| Field | Type | Description |
file required | integer | The file's index. |
parts required | integer[] | |
{"file":0,"parts":[1,2,3]}
Response body (JSON)
| Field | Type | Description |
expiresAt required | string | |
parts required | object[] | |
Responses
| Status | Body | Meaning |
| 200 | JSON | Where each part goes. |
| 400 | application/problem+json | The request is malformed (invalid). |
| 401 | application/problem+json | No token, or it expired: sign in again (unauthenticated). |
| 403 | application/problem+json | The token lacks the scope (scope_missing), the container is zero-access (zero_access), or the caller may not use this operation (forbidden). |
| 404 | application/problem+json | Not found, or not yours (not_found). |
| 426 | application/problem+json | K8 HQ has been updated. Reload this page. |
| 429 | application/problem+json | Too many requests (rate_limited). The token is paused until midnight UTC if it goes over its daily request or download limit, or reaches its daily recipient limit. A message with more recipients than the token has left today is refused. If the token has some recipients left, you can send to fewer. Too many attempts with a wrong token also return this response. |
| 503 | application/problem+json | Temporary failure; try again (unavailable). |
Count an uploaded import's messages
POST/inboxes/{inbox}/imports/{upload}/scan
Checks every part of every file arrived at its size and counts the files' messages and bytes, from their From separators (as a dry run counts them), in the background: follow it with GET /inboxes/{inbox}/transfers/{job} until status is scanned, when estimate says what the import will cost and creditOk whether the organization's credit covers it. Nothing is stored or billed. Asking again returns the same. People only: a person signed in to the web app, never an access token or an assistant (403). Not for zero-access inboxes (403 zero_access): K8 HQ's servers can't read their mail, so imports and exports happen on the person's own device there.
For the web app.
Parameters
| Name | Type | Description |
inbox (path) required | string | Inbox ID (ibx_…). |
upload (path) required | string | The upload (upl_). |
Idempotency-Key (header) | string | Up to 255 characters; a retry with the same key gets the first response. |
Response body (JSON)
| Field | Type | Description |
createdAt required | string | |
id required | string | The job (job_). |
kind required | import | export | |
progress required | object | Counts so far. Imports: while counting, estMessages and estBytes; then imported, duplicates (already in the folder, skipped), deleted (marked deleted in the file, skipped), failed (not messages, over 40 MB, or refused), notStored (of failed, the ones the store refused after several tries: importing the same files again adds them), filesFailed (files or zipped mailboxes that aren't mbox), bytesDone and bytesTotal (of the uploaded files). Exports: messages, folders, failed (messages that couldn't be read), and size (the zip, once it's ready). |
status required | scanning | scanned | queued | running | waiting | succeeded | failed | cancelled | Imports first: scanning while their files are counted, scanned once the estimate is ready (start or cancel it). Then queued, running; waiting: an attempt failed and it carries on shortly from where it stopped. failed: it stopped for good; K8 HQ staff are told, and messages imported before it stopped stay. |
costSoFar | string | Started imports: what they've been charged so far (the upload and each message stored; storage comes daily, as for all mail). |
creditOk | boolean | Counted imports: the organization's available credit covers the estimate (else starting it is refused). |
estimate | object | Imports: what it's expected to cost, from the count, rounded up to the cent: import once (every charge the import makes: the upload, each new message stored and indexed for search, and the check for messages already there), storagePerMonth while the mail is kept, total the two. Messages already in their folders are skipped and cost only that check. |
expiresAt | string | Exports: until when it can be downloaded (7 days after it's ready). |
files | string[] | Imports: the uploaded files' names. |
finishedAt | string | |
folder | string | Imports: the folder their messages go to (empty: INBOX), unless keepFolders. |
keepFolders | boolean | Imports: each file's (or zipped mailbox's) own name is its folder. |
upload | string | Imports: their upload (upl_), to start or cancel it. |
Responses
| Status | Body | Meaning |
| 201 | Transfer | The import, counting (scanning). |
| 401 | application/problem+json | No token, or it expired: sign in again (unauthenticated). |
| 402 | application/problem+json | The organization is out of credit (out_of_credit). Or the organization is read-only (read_only): out of credit for 60 days, so nothing can be changed until an owner adds credit. |
| 403 | application/problem+json | The token lacks the scope (scope_missing), the container is zero-access (zero_access), or the caller may not use this operation (forbidden). |
| 404 | application/problem+json | Not found, or not yours (not_found). |
| 409 | application/problem+json | A part is missing (conflict; the detail says which), the upload expired, the organization already runs two imports or exports, or the same Idempotency-Key is still running (in_progress). |
| 426 | application/problem+json | K8 HQ has been updated. Reload this page. |
| 429 | application/problem+json | Too many requests (rate_limited). The token is paused until midnight UTC if it goes over its daily request or download limit, or reaches its daily recipient limit. A message with more recipients than the token has left today is refused. If the token has some recipients left, you can send to fewer. Too many attempts with a wrong token also return this response. |
| 503 | application/problem+json | Temporary failure; try again (unavailable). |
Start a counted import
POST/inboxes/{inbox}/imports/{upload}/start
Starts the import once its person has seen the estimate (its count finished, scanned). It runs in the background: follow it with GET /inboxes/{inbox}/transfers/{job}, whose costSoFar is what it has been charged. Starting again returns the same import. Refused when the estimate is more than the organization's available credit (402). Messages already in their folder (by Message-ID, or date, sender, subject and size) are skipped, so importing a file twice adds nothing. Mail apps see the messages as they're stored. The uploaded files are deleted when it finishes, and the person gets a notice. People only: a person signed in to the web app, never an access token or an assistant (403). Not for zero-access inboxes (403 zero_access): K8 HQ's servers can't read their mail, so imports and exports happen on the person's own device there. With semantic, the imported messages are also made searchable by meaning (or not), whatever the mailbox's setting; the estimate checked against the credit includes it.
For the web app.
Parameters
| Name | Type | Description |
inbox (path) required | string | Inbox ID (ibx_…). |
upload (path) required | string | The upload (upl_). |
Idempotency-Key (header) | string | Up to 255 characters; a retry with the same key gets the first response. |
Request body (JSON)
| Field | Type | Description |
semantic | boolean | "Also make these messages searchable by meaning": embed the imported messages (the estimate's semantic cost is added). Default: the mailbox's setting. Refused (403) where the organization forbids it or the mailbox is zero-access. |
Response body (JSON)
| Field | Type | Description |
createdAt required | string | |
id required | string | The job (job_). |
kind required | import | export | |
progress required | object | Counts so far. Imports: while counting, estMessages and estBytes; then imported, duplicates (already in the folder, skipped), deleted (marked deleted in the file, skipped), failed (not messages, over 40 MB, or refused), notStored (of failed, the ones the store refused after several tries: importing the same files again adds them), filesFailed (files or zipped mailboxes that aren't mbox), bytesDone and bytesTotal (of the uploaded files). Exports: messages, folders, failed (messages that couldn't be read), and size (the zip, once it's ready). |
status required | scanning | scanned | queued | running | waiting | succeeded | failed | cancelled | Imports first: scanning while their files are counted, scanned once the estimate is ready (start or cancel it). Then queued, running; waiting: an attempt failed and it carries on shortly from where it stopped. failed: it stopped for good; K8 HQ staff are told, and messages imported before it stopped stay. |
costSoFar | string | Started imports: what they've been charged so far (the upload and each message stored; storage comes daily, as for all mail). |
creditOk | boolean | Counted imports: the organization's available credit covers the estimate (else starting it is refused). |
estimate | object | Imports: what it's expected to cost, from the count, rounded up to the cent: import once (every charge the import makes: the upload, each new message stored and indexed for search, and the check for messages already there), storagePerMonth while the mail is kept, total the two. Messages already in their folders are skipped and cost only that check. |
expiresAt | string | Exports: until when it can be downloaded (7 days after it's ready). |
files | string[] | Imports: the uploaded files' names. |
finishedAt | string | |
folder | string | Imports: the folder their messages go to (empty: INBOX), unless keepFolders. |
keepFolders | boolean | Imports: each file's (or zipped mailbox's) own name is its folder. |
upload | string | Imports: their upload (upl_), to start or cancel it. |
Responses
| Status | Body | Meaning |
| 201 | Transfer | The import. |
| 401 | application/problem+json | No token, or it expired: sign in again (unauthenticated). |
| 402 | application/problem+json | The estimate is more than the organization's credit (out_of_credit; the detail says the estimate). Or the organization is read-only (read_only): out of credit for 60 days, so nothing can be changed until an owner adds credit. |
| 403 | application/problem+json | The token lacks the scope (scope_missing), the container is zero-access (zero_access), or the caller may not use this operation (forbidden). |
| 404 | application/problem+json | Not found, or not yours (not_found). |
| 409 | application/problem+json | The files are still being counted (conflict), the upload expired, the organization already runs two imports or exports, or the same Idempotency-Key is still running (in_progress). |
| 426 | application/problem+json | K8 HQ has been updated. Reload this page. |
| 429 | application/problem+json | Too many requests (rate_limited). The token is paused until midnight UTC if it goes over its daily request or download limit, or reaches its daily recipient limit. A message with more recipients than the token has left today is refused. If the token has some recipients left, you can send to fewer. Too many attempts with a wrong token also return this response. |
| 503 | application/problem+json | Temporary failure; try again (unavailable). |
List my imports and exports
GET/inboxes/{inbox}/transfers
The caller's own imports into and exports of the inbox, newest first (recent ones). People only: a person signed in to the web app, never an access token or an assistant (403). Not for zero-access inboxes (403 zero_access): K8 HQ's servers can't read their mail, so imports and exports happen on the person's own device there.
For the web app.
Parameters
| Name | Type | Description |
inbox (path) required | string | Inbox ID (ibx_…). |
Response body (JSON)
| Field | Type | Description |
maxBytes required | integer | The most one import may upload. |
transfers required | Transfer[] | |
Responses
| Status | Body | Meaning |
| 200 | JSON | The imports and exports. |
| 401 | application/problem+json | No token, or it expired: sign in again (unauthenticated). |
| 403 | application/problem+json | The token lacks the scope (scope_missing), the container is zero-access (zero_access), or the caller may not use this operation (forbidden). |
| 404 | application/problem+json | Not found, or not yours (not_found). |
| 426 | application/problem+json | K8 HQ has been updated. Reload this page. |
| 429 | application/problem+json | Too many requests (rate_limited). The token is paused until midnight UTC if it goes over its daily request or download limit, or reaches its daily recipient limit. A message with more recipients than the token has left today is refused. If the token has some recipients left, you can send to fewer. Too many attempts with a wrong token also return this response. |
| 503 | application/problem+json | Temporary failure; try again (unavailable). |
Get an import or export
GET/inboxes/{inbox}/transfers/{job}
One of the caller's own imports or exports, with its progress. People only: a person signed in to the web app, never an access token or an assistant (403). Not for zero-access inboxes (403 zero_access): K8 HQ's servers can't read their mail, so imports and exports happen on the person's own device there.
For the web app.
Parameters
| Name | Type | Description |
inbox (path) required | string | Inbox ID (ibx_…). |
job (path) required | string | The import or export (job_). |
Response body (JSON)
| Field | Type | Description |
createdAt required | string | |
id required | string | The job (job_). |
kind required | import | export | |
progress required | object | Counts so far. Imports: while counting, estMessages and estBytes; then imported, duplicates (already in the folder, skipped), deleted (marked deleted in the file, skipped), failed (not messages, over 40 MB, or refused), notStored (of failed, the ones the store refused after several tries: importing the same files again adds them), filesFailed (files or zipped mailboxes that aren't mbox), bytesDone and bytesTotal (of the uploaded files). Exports: messages, folders, failed (messages that couldn't be read), and size (the zip, once it's ready). |
status required | scanning | scanned | queued | running | waiting | succeeded | failed | cancelled | Imports first: scanning while their files are counted, scanned once the estimate is ready (start or cancel it). Then queued, running; waiting: an attempt failed and it carries on shortly from where it stopped. failed: it stopped for good; K8 HQ staff are told, and messages imported before it stopped stay. |
costSoFar | string | Started imports: what they've been charged so far (the upload and each message stored; storage comes daily, as for all mail). |
creditOk | boolean | Counted imports: the organization's available credit covers the estimate (else starting it is refused). |
estimate | object | Imports: what it's expected to cost, from the count, rounded up to the cent: import once (every charge the import makes: the upload, each new message stored and indexed for search, and the check for messages already there), storagePerMonth while the mail is kept, total the two. Messages already in their folders are skipped and cost only that check. |
expiresAt | string | Exports: until when it can be downloaded (7 days after it's ready). |
files | string[] | Imports: the uploaded files' names. |
finishedAt | string | |
folder | string | Imports: the folder their messages go to (empty: INBOX), unless keepFolders. |
keepFolders | boolean | Imports: each file's (or zipped mailbox's) own name is its folder. |
upload | string | Imports: their upload (upl_), to start or cancel it. |
Responses
| Status | Body | Meaning |
| 200 | Transfer | The import or export. |
| 401 | application/problem+json | No token, or it expired: sign in again (unauthenticated). |
| 403 | application/problem+json | The token lacks the scope (scope_missing), the container is zero-access (zero_access), or the caller may not use this operation (forbidden). |
| 404 | application/problem+json | Not found, or not yours (not_found). |
| 426 | application/problem+json | K8 HQ has been updated. Reload this page. |
| 429 | application/problem+json | Too many requests (rate_limited). The token is paused until midnight UTC if it goes over its daily request or download limit, or reaches its daily recipient limit. A message with more recipients than the token has left today is refused. If the token has some recipients left, you can send to fewer. Too many attempts with a wrong token also return this response. |
| 503 | application/problem+json | Temporary failure; try again (unavailable). |