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

List labels

GET/labels

Lists your organisation’s labels, with how many conversations carry each.

Needs the permissionlabels:list

Labels are your organisation’s own markers for conversations. They live in DMU Mail and are never written to the mail server.

Returns

A list of labels, each with:

idstring
The label.
namestring
Its name.
parentIdstring or null
The label it sits inside, or null for a top-level label. Labels go three levels deep at most.
colourstring
A hue (red, orange, amber, yellow, lime, green, teal, cyan, blue, indigo, violet, pink or stone) and a strength (100, 200, 700 or 900), such as blue-700.
scopestring
Where it can be used: everywhere, teams or mailboxes.
teamIdslist of strings
With scope teams: the teams whose shared mailboxes can use it, including mailboxes shared with them later.
mailboxIdslist of strings
With scope mailboxes: the ones the key’s owner can see.
conversationsnumber
Conversations carrying it, across the organisation.
openConversationsnumber
The open ones among them that the key’s owner can see.

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 labels: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/labels \
  -H "Authorization: Bearer dmk_7f3a9c2e1b4d_Xq8v…"

Response

200 OK

{
  "data": [
    {
      "id": "5b0e2c71",
      "name": "Invoices",
      "parentId": null,
      "colour": "blue-700",
      "scope": "everywhere",
      "teamIds": [],
      "mailboxIds": [],
      "conversations": 12,
      "openConversations": 4
    }
  ]
}

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