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

Update many threads

PATCH/threads

Makes the same change to up to 200 conversations in one request, such as marking a screenful read.

Needs the permissionthreads:update

One request per conversation would spend the minute’s allowance on the first page. This takes the fields of Update a thread, and the ids to apply them to.

applied counts the conversations that changed. Ids the key can’t see are left out without an error. For read, which is kept per person, it’s always the number of ids you sent.

Body

idslist of stringsrequired
Up to 200 thread ids.
statusstringoptional
open, closed, spam or trash.
isImportantbooleanoptional
Mark it important, or not.
readbooleanoptional
Read or unread, for the key’s owner.
assignstringoptional
A person’s user id, to put them on the conversation.
unassignstringoptional
A person’s user id, to take them off it.

Returns

appliednumber
How many changed.
requestednumber
How many ids you sent.

Errors

400ids_required
There’s no ids list, or it’s empty.
400too_many_ids
More than 200 ids.
400invalid_patch
There’s nothing to change, or a field has the wrong value.
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 threads:update. The X-Required-Scope header names what’s missing.
403not_your_mailbox
Spam or trash on a conversation given to the key’s owner without its mailbox. Nothing was changed.
429rate_limited
More than 120 requests a minute from this key. Wait for Retry-After seconds.
curl https://app.dmu.email/api/v1/threads \
  -X PATCH \
  -H "Authorization: Bearer dmk_7f3a9c2e1b4d_Xq8v…" \
  -H "Content-Type: application/json" \
  -d '{ "ids": ["a41c93f0", "f3d86b25"], "read": true }'

Response

200 OK

{
  "data": {
    "applied": 2,
    "requested": 2
  }
}

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