Archive API: importing legacy data without a browser
The API under /api/v1/archive: upload PST, MBOX, EML and ZIP files by script, check the count, approve the import one by one or in bulk and query the status. PST up to 250 GB per file.
Large legacy holdings can also reach the archive without a browser. The API under /api/v1/archive performs the same steps as the Legacy data tab under Archive, Sources:
- Create a job.
- Upload the file.
- Check the count.
- Approve the import.
A script can thus upload many files overnight or from a server, without a browser window staying open. Which way suits which case is described under importing legacy data.
Address and sign-in
| Address | https://conbool.com/api/v1/archive, for your own installation its address |
| Sign-in | header Authorization: Bearer <key> |
| Scope | archive:import |
| Limit | 60 calls per key and minute, shared by all calls of this key under /api/v1 |
| Lockout | after 30 failed sign-ins within one minute from the same address, the API answers that address with 429 |
Key
A key is created under Administration, Settings, tile SIEM and APIs:
- Usually in the Connections tab, sub-tab Endpoint, card API keys.
- Depending on the products booked, the tab is called Keys and shows the API keys card directly.
There, choose Create new API key and turn on the Archive import switch. Only someone who may manage API keys can create a key. The switch only exists in a tenant with Archive, and only someone who may manage the archive settings can set it. The card under 365 Backup only creates keys for the backup; the switch is missing there.
A key can be restricted to IP addresses, given an expiry and revoked. For a script, it is advisable to restrict the key to the addresses of the server it runs on and to give it an expiry.
The key acts on behalf of the person who created it:
- Their jobs appear in the Legacy data tab like any other job.
- The log records the API and the key's identifier.
- If the person loses the right to the archive settings or leaves the tenant, the API no longer accepts the key.
The scope allows importing only. Reading or searching the archive is not part of it.
Flow
1. Choose the target mailbox
GET /api/v1/archive/mailboxes
The response lists the mailboxes of the directory, whether they already hold an archive seat, and how many seats are free:
{
"mailboxes": [
{ "email": "anna@example.org", "name": "Anna Example", "hasArchiveSeat": true }
],
"freeSeats": 12
}
All messages of a file land in exactly one mailbox. For several mailboxes there is therefore one file and one job per mailbox.
2. Create a job
POST /api/v1/archive/imports
{
"mailbox": "anna@example.org",
"fileName": "anna-2019-2024.pst",
"sizeBytes": 193273528320
}
format (pst, mbox, eml or zip) is optional; without it the file extension applies. The response with status 201 contains the job and the upload plan:
{
"import": { "id": "…", "phase": "uploading", "…": "…" },
"upload": { "partSize": 268435456, "partCount": 720, "partUrlTtlSeconds": 3600 }
}
3. Upload
The file is cut into partCount parts of size partSize; the last part is shorter. Part 1 starts at byte 0.
- Fetch addresses for up to 100 parts:
POST /api/v1/archive/imports/{id}/partswith{ "partNumbers": [1, 2, 3] }. - Send each part with
PUTto its address.
The response lists the address and its expiry for each part:
{
"parts": [
{ "partNumber": 1, "url": "https://…", "expiresAt": "2026-12-02T10:14:03.512Z" }
]
}
The addresses are valid for one hour. So only fetch as many as will be uploaded in that time. Anyone who knows an address can write the part during that time, so the addresses do not belong in logs, tickets or chats.
The file goes straight into the archive's storage, not through a Conbool server. Parts can be sent in parallel.
Resuming after an interruption: GET /api/v1/archive/imports/{id}/parts lists in uploadedPartNumbers the parts that have already arrived. Upload only the missing ones.
If nothing happens on an upload for 24 hours, it counts as abandoned and is cancelled. Every call to …/parts counts as a sign of life.
4. Complete
POST /api/v1/archive/imports/{id}/complete with { "sizeBytes": 193273528320 }
The list of parts comes from the storage, not from the caller, so the script does not need to keep the check value (ETag) the storage returns for each part. If parts are missing, the API answers with 409 archive.upload_incomplete, and uploading can continue. A second call after completion changes nothing.
5. Check the count and approve
After completion, the import counts the messages in the file. Nothing goes into the archive yet. GET /api/v1/archive/imports/{id} shows the status:
phaseiscountingduring the count andawaiting_approvalafterwards.counts.discoveredgives the number of messages.
Only then does it continue:
POST /api/v1/archive/imports/{id}/approve
Without approval nothing is archived, and no setting skips it. The reason: anything in the archive is subject to retention and cannot be taken back. An import into the wrong mailbox would stay there until the period ends.
Approval is also possible in the Legacy data tab.
6. Approving several imports in bulk
Whoever uploads many files approves them together in two steps.
GET /api/v1/archive/imports/approval gives how many counted imports are waiting, how many messages they hold together, and a cut-off time:
{
"awaitingApproval": { "count": 12, "discovered": 845210, "countedUpTo": "2026-12-02T09:14:03.512+00:00" }
}
If nothing is waiting, count is 0 and countedUpTo is null.
POST /api/v1/archive/imports/approval with { "countedUpTo": "…" }, the value from the GET, unchanged. All imports whose count had finished by that time are approved. Anything counted afterwards is left out; there is no approval for future imports. The response gives approved, discovered and importIds. Each approval is logged separately.
7. Tracking
GET /api/v1/archive/imports lists the latest 100 jobs. GET /api/v1/archive/imports/{id} shows one.
The counters in counts:
| Counter | Meaning |
|---|---|
discovered | messages according to the count |
imported | taken into the archive |
duplicates | already in the archive with the same content |
failed | not imported |
skippedNonMail | PST only: appointments, tasks and contacts, not an error |
A job can be cancelled as long as it has not finished: POST /api/v1/archive/imports/{id}/cancel. Whatever has been archived until then stays in the archive.
States
phase | Meaning |
|---|---|
uploading | file is being uploaded |
queued | uploaded, waiting for the import |
counting | count running, nothing in the archive yet |
awaiting_approval | count finished, waiting for approval |
importing | approved, messages are being archived |
paused | paused, by hand or because storage is short |
completed | finished |
failed | failed, reason in lastError |
cancelled | cancelled |
Limits
| Format | Largest file |
|---|---|
| PST | 250 GB |
| MBOX, EML, ZIP | 60 GB |
| all formats, operated on premises | 60 GB |
Further limits:
- A ZIP holds single EML files, at most 200,000 entries.
- One call signs at most 100 parts.
- A single message in an MBOX, EML or ZIP file may be at most 150 MiB. The import does not take larger ones; they count under
failed. - A mailbox without an archive seat needs a free seat. If all are taken, the API answers with 409
archive.no_free_seat.
A larger holding can be split into several files, for example by year. Each file is then its own job for the same mailbox. Messages already in the archive with the same content count as duplicates and are not stored twice.
Errors
Every error response has the form { "error": { "code": "…", "message": "…" } }. For sign-in errors and for status 500, message is missing.
| Status | Meaning |
|---|---|
| 400 | invalid input (archive.invalid_input), unknown format (archive.unknown_format) |
| 401 | key missing, invalid, revoked, expired, still awaiting approval or not allowed for this IP address |
| 403 | scope missing, the key owner may not manage the archive settings, or the tenant has no Archive |
| 404 | job unknown |
| 409 | step does not fit the state, such as upload incomplete, size mismatch, count not finished, job already finished, no free archive seat |
| 413 | file larger than allowed (archive.file_too_large) |
| 422 | mailbox unknown in the directory (archive.unknown_mailbox) |
| 429 | too many calls, retry after the time in the Retry-After header |
| 500 | unexpected error (archive.internal_error), try again later |
| 503 | approval not possible right now (archive.approval_unavailable), try again later |
OpenAPI description
A machine-readable description in OpenAPI 3 format is available at /assets/archive-import-openapi.json.