Multi Message Actions
Update messages
Update message information for matching emails<br/><br/>For Gmail API accounts the entire label set cannot be replaced in one call. Add and remove labels individually instead of using the set operation.
put/v1/account/{account}/messages
Request
- Base URL: https://your-emailengine-host
- URL: https://your-emailengine-host/v1/account/{account}/messages
- Auth: HTTP bearer
Path parameters
accountstring required
Unique identifier for the email account
Example:user123
Query parameters
pathstring required
Mailbox folder path. Can use special use labels like "\Sent". Special value "\All" is available for Gmail IMAP, Gmail API, MS Graph API accounts.
Example:INBOX
Headers
x-ee-timeoutinteger
Request timeout in milliseconds. Raises the command timeout above the EENGINE_TIMEOUT default for a long-running request; a value below the default has no effect
Example:30000
Request body
Example request
{
"search": {
"seq": "1:10",
"from": "nyan.cat@example.com",
"to": "support@example.com",
"cc": "billing@example.com",
"bcc": "archive@example.com",
"body": "Hello world",
"subject": "Hello world",
"larger": 1048576,
"smaller": 102400,
"uid": "100:200",
"modseq": 12345,
"before": "2024-08-09",
"since": "2022-08-09",
"sentBefore": "2024-08-09",
"sentSince": "2022-08-09",
"emailId": "1278455344230334865",
"threadId": "1694936993596975454",
"header": {
"Message-ID": "<1DAF52A51E674A2@example.com>"
},
"gmailRaw": "has:attachment in:unread",
"labels": {
"has": [
"Horizon"
],
"not": [
"Horizon"
]
},
"emailIds": [
"1278455344230334865"
]
},
"update": {
"flags": {
"add": "\\Seen",
"delete": "\\Flagged"
}
}
}Response
Returns which flag and label changes were applied to the matching messages.
Example response
{
"flags": {
"add": [
"\\Seen"
],
"delete": [
"\\Seen"
],
"set": [
"\\Seen"
]
},
"labels": {
"add": [
"Label_971539351003152516"
],
"delete": [
"Label_971539351003152516"
],
"set": [
"Label_971539351003152516"
]
},
"failed": {
"emailIds": [
"1278455344230334865"
]
},
"emailIds": [
"1278455344230334865"
]
}Changes
No recorded changes to this operation across all 1 revision of this API.