Base URL
https://app.dmu.email/api/v1
Authentication
Bearer dmk_… API key
Rate limit
120 requests a minute per key

List imports

GET/mailboxes/{id}/imports

Lists a mailbox’s imports, newest first, and how far each has got.

Needs the permissionimports:list

percent is measured against what the import will actually go through, counted when it starts. Until then it’s null, not 0.

With ?folders=1 you also get the folders on the mail server, to choose what to import. That opens a connection to the server and takes a few seconds, so ask once, not on every poll. If it fails, the imports still come back, with the reason in folderError.

Path parameters

idstringrequired
The mailbox.

Query parameters

foldersstringoptional
1 to list the server’s folders as well.

Returns

A list of imports, each with:

idstring
The import.
statusstring
queued, running, stopping, done or failed.
folderslist of strings
What it imports.
sincestring or null
The oldest mail it takes, or null for all of it.
processednumber
Messages gone through so far, out of total once that’s counted.
percentnumber or null
How far it’s got.
importednumber
Messages added. skipped counts the ones it left, usually because DMU Mail had them already, and errors the ones that failed.
lastErrorstring or null
The last thing that went wrong.
startedAtstring
With finishedAt, which is null until it ends.
folderslist
Next to data, with ?folders=1: each folder’s path, its role and its number of messages.

Errors

401invalid_key
The key is wrong, expired or revoked. With no Authorization header at all, the code is missing_credentials.
403missing_scope
The key doesn’t have imports:list. The X-Required-Scope header names what’s missing.
429rate_limited
More than 120 requests a minute from this key. Wait for Retry-After seconds.
curl https://app.dmu.email/api/v1/mailboxes/9e53e6ba/imports \
  -H "Authorization: Bearer dmk_7f3a9c2e1b4d_Xq8v…"

Response

200 OK

{
  "data": [
    {
      "id": "c90f3a17",
      "status": "running",
      "folders": ["INBOX", "Sent"],
      "since": "2025-09-27T08:30:00.000Z",
      "processed": 1840,
      "total": 4210,
      "percent": 44,
      "imported": 1822,
      "skipped": 18,
      "errors": 0,
      "lastError": null,
      "startedAt": "2026-09-27T08:30:00.000Z",
      "finishedAt": null
    }
  ]
}

Every response wraps its result in data. A page of threads adds nextCursor, which is null on the last page.