threadMessages maps each threadId to the list of messageId values within it that the action should apply to, so you can act on a single message or a whole thread.read and unread are confirmed working against Gmail. The accepted vocabulary is enforced by the mail backend rather than by CMR, so an unrecognised value returns 400 with "action is required and must be a valid email action". Values that move or label mail take the data object.{
"userId": "K5PF9Y068AMDGENV5BTCNJJZK55F",
"account": "andrew.lawyer@aurumlawyer.com",
"threadMessages": {
"1877937258181177440": ["<Gq3K93hRllxHkWlnjYO1wg@notifications.google.com>"]
},
"action": "read"
}curl --location 'https://customers.coldmailreseller.com/api/v1/integration/onebox/action' \
--header 'cmr-x-api-key: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"userId": "K5PF9Y068AMDGENV5BTCNJJZK55F",
"account": "andrew.lawyer@aurumlawyer.com",
"threadMessages": {
"1877937258181177440": [
"<Gq3K93hRllxHkWlnjYO1wg@notifications.google.com>"
]
},
"action": "read",
"data": {
"folder": "archive",
"label": "important"
}
}'{
"status": 200,
"message": "Action applied",
"data": {
"message": "1 of 1 threads updated successfully.",
"results": [
{
"success": true
}
]
}
}