Update a mailbox
/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:
truepauses the mailbox,falseresumes 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: theaccessVersionyou read. If who can see it has changed since, nothing is changed. unassignbooleanoptional- With
access:trueto 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_accessaccessisn’t{ everyone, teamIds, userIds }, or an id in it isn’t one.400unknown_team- A team in
teamIdsisn’t in the organisation. 400unknown_person- Someone in
userIdsisn’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. TheX-Required-Scopeheader 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-Afterseconds.