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

Update a mailbox

PATCH/mailboxes/{id}

Changes a mailbox’s settings, or pauses and resumes it. Send only what changes; everything else stays as it is.

Needs the permissionmailboxes:update

{ "paused": true } stops DMU Mail checking the mailbox, which is what you want when a provider starts limiting you, and false starts it again. Send paused on its own: next to other fields it’s ignored.

Correcting the servers, user names, encryption or password of a broken mailbox tries it again straight away.

Who can see a shared mailbox: send access in full, as Get a mailbox gives it, and only an administrator’s key can change it. Taking the mailbox from someone who has conversations assigned in it answers 409 removes_assignees and changes nothing; its people lists each one’s userId, name and conversations. Send the same change with "unassign": true to go ahead, and they’re unassigned.

Add the accessVersion you read to be told with 409 conflict, instead of overwriting, when someone changed who can see it since. Sent with other settings, the other settings are saved first.

teamId, the older form, means exactly that one team, or null for everyone. Sending back the teamId you read changes nothing, so an integration that copies a mailbox’s fields back can’t narrow or widen one shared with several teams by accident.

Whether a mailbox is shared or private can’t be changed through the API, only in DMU Mail, where it shows who gains or loses access.

Path parameters

idstringrequired
The mailbox.

Body

pausedbooleanoptional
On its own: true pauses the mailbox, false resumes it.
displayNamestringoptional
The name recipients see.
passwordstringoptional
A new password. Leave it out to keep the one stored.
imapHoststringoptional
Or any other setting from Add a mailbox: email, imapPort, imapUsername, smtpHost, smtpPort, smtpUsername, smtpEncryption.
accessobjectoptional
Who can see it, in full: { "everyone": true }, or { "everyone": false, "teamIds": […], "userIds": […] } for the teams and people ticked on it.
accessVersionstringoptional
With access: the accessVersion you read. If who can see it has changed since, nothing is changed.
unassignbooleanoptional
With access: true to go ahead when the change takes the mailbox from people with assigned conversations.
teamIdstring or nulloptional
The older form of access: one team, or null for everyone.

Returns

idstring
The mailbox.
pausedboolean
Only when you sent paused.

Errors

400invalid_mailbox
A setting is wrong, and the message says which.
400invalid_access
access isn’t { everyone, teamIds, userIds }, or an id in it isn’t one.
400unknown_team
A team in teamIds isn’t in the organisation.
400unknown_person
Someone in userIds isn’t an active member of the organisation.
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 mailboxes:update. The X-Required-Scope header names what’s missing.
403not_admin
Only an administrator can change who can see a shared mailbox.
404not_found
There’s no such mailbox, or the key’s owner can’t see it.
404not_shared
The mailbox is private, so nobody else can be given it.
409mailbox_exists
The new address is already connected.
409removes_assignees
The change takes the mailbox from people with assigned conversations. Nothing changed; see people.
409conflict
Who can see it changed after you read accessVersion. Read it again.
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 \
  -X PATCH \
  -H "Authorization: Bearer dmk_7f3a9c2e1b4d_Xq8v…" \
  -H "Content-Type: application/json" \
  -d '{ "paused": true }'

Response

200 OK

{
  "data": {
    "id": "9e53e6ba",
    "paused": true
  }
}

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