Actions with messages
/v1/mailboxes/{mailbox_id}/messages/actionsApplies an action to selected messages in one folder. Pass their IDs to uids, the folder name to folder and its uidvalidity. For action=move, also specify the target folder to destination.
Authentication and access · Errors and retries
Request
curl -X POST 'https://adapt-mail.com/v1/mailboxes/<mailbox_id>/messages/actions' \ -H 'Authorization: Bearer <access_token>' \ -H 'Content-Type: application/json' \ --data '{"folder":"INBOX","uidvalidity":1,"uids":[1],"action":"read"}'Parameters
mailbox_idpathNecessarilyintegerX-Customer-IDheader- Option 1
stringOption 2null
Request body · application/json
object
folderNecessarilystringFolder name from the folder list, for example INBOX.
minLength: 1maxLength: 255uidvalidityNecessarilyintegerThe value is uidvalidity from the response API for this folder.
exclusiveMinimum: 0uidsNecessarilyarrayIdentifiers of selected letters from one folder.
minItems: 1maxItems: 100Array elementsintegeractionNecessarilystringValid values:
"read""unread""star""unstar""move""delete"destinationTarget folder name. Required for action=move.
Option 1stringmaxLength: 255Option 2null
Unknown fields are not accepted.
Responses
200 Successful response
application/json
object
updatedboolean
401 Login required
application/json
object
detail- Option 1
stringOption 2objectcodestringmessagestring
Option 3arrayArray elementsobject
403 No access
application/json
object
detail- Option 1
stringOption 2objectcodestringmessagestring
Option 3arrayArray elementsobject
404 Resource not found
application/json
object
detail- Option 1
stringOption 2objectcodestringmessagestring
Option 3arrayArray elementsobject
409 State conflict
application/json
object
detail- Option 1
stringOption 2objectcodestringmessagestring
Option 3arrayArray elementsobject
422 Validation error
application/json
object
detailarrayArray elementsobjectlocNecessarilyarrayArray elementsOption 1stringOption 2integermsgNecessarilystringtypeNecessarilystring
503 Temporarily unavailable
application/json
object
detail- Option 1
stringOption 2objectcodestringmessagestring
Option 3arrayArray elementsobject