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

Import history

POST/mailboxes/{id}/imports

Starts bringing a mailbox’s older mail into DMU Mail. New mail arrives by itself; this is for the years before the mailbox was connected.

Needs the permissionimports:start

The import runs in the background, newest mail first. Follow it with List imports, and stop it whenever you like: what’s imported by then stays. A mailbox runs one import at a time.

Path parameters

idstringrequired
The mailbox.

Body

folderslist of stringsrequired
The folders to import, by path. List imports with ?folders=1 shows what’s on the server.
rangestringoptional
all, 1y, 6m or 1m. Defaults to all.

Returns

idstring
The import. Pass it as runId to stop it.
statusstring
Always queued.

Errors

400bad_range
range isn’t one of the four.
400import_refused
It couldn’t start, for example with no folders. The message says why.
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:start. The X-Required-Scope header names what’s missing.
404not_found
There’s no such mailbox, or the key’s owner can’t see it.
409import_running
This mailbox already has an import running.
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 \
  -X POST \
  -H "Authorization: Bearer dmk_7f3a9c2e1b4d_Xq8v…" \
  -H "Content-Type: application/json" \
  -d '{ "folders": ["INBOX", "Sent"], "range": "1y" }'

Response

200 OK

{
  "data": {
    "id": "c90f3a17",
    "status": "queued"
  }
}

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