Batch Operations

Modify messages

Modifies labels and markers for multiple messages.

PUT /rest/v2/:domain/:user/mailbox/message

Parameters

addlabel
Optional Multiple integer - Add label to the message.
removelabel
Optional Multiple integer - Remove label from the message.
addmarker
Optional Multiple string - Add marker to the message.
removemarker
Optional Multiple string - Add marker to the message.

Each of the parameters can be used multiple times in order to add/remove multiple labels/markers.

Input

JSON array of message IDs.

Note: Request content type should be application/json

[
  "e5031a10-f81d-11df-a88e-080027267700",
  "e54f6550-f81d-11df-a9d1-080027267700",
  "..."
]

Response

Status: 204 No Content

Example request

$ curl -XPUT \
  "http://host:8181/rest/v2/domain.tld/user/mailbox/message?addlabel=3&addlabel=540&removemarker=seen" \
   -d "[\"e5031a10-f81d-11df-a88e-080027267700\", \"e54f6550-f81d-11df-a9d1-080027267700\"]" \
   -H "Content-Type: application/json"

Delete messages

Delete multiple messages.

DELETE /rest/v2/:domain/:user/mailbox/message

Input

JSON array of message IDs.

Note: Request content type should be application/json

[
  "e5031a10-f81d-11df-a88e-080027267700",
  "e54f6550-f81d-11df-a9d1-080027267700",
  "..."
]

Response

Status: 204 No Content

Example request

% curl -XDELETE "http://host:8181/rest/v2/domain.tld/user/mailbox/message" \
  -d "[\"e5031a10-f81d-11df-a88e-080027267700\", \"e54f6550-f81d-11df-a9d1-080027267700\"]" \
  -H "Content-Type: application/json"