Mark Emails as Unread
Purpose
This API is used to mark single or multiple emails as unread.
OAuth Scope
Use the scope
MailApps.messages.ALL (or) MailApps.messages.UPDATE
ALL-Full access to the messages.
UPDATE -Mark the email as unread.
To generate Authtoken, refer here.
Request URL
Method: PUT
https://mail360.zoho.com/api/accounts/{account_key}/messages
Path Parameters
- account_key* string
- This key is used to identify the specific account and is generated during account addition.
- This parameter can be retrieved from Get all Accounts API.
Request Body (JSON object)
- mode* string
- This parameter represents the type of operation that is to be performed.
- Provide the value as markAsUnread.
- messageId* JSON Array of long values
- This parameter should be passed as an array containing one or more message IDs that need to be marked as unread. A message ID is a unique identifier for an email.
* - Mandatory parameter
Note:
While the Messages APIs focus on individual messages, the Threads APIs deal with entire conversation threads, each of which contains multiple messages.
Sample Request
Copiedcurl "https://mail360.zoho.com/api/accounts/x7k**00s/messages" \
-X PUT \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization:Zoho-oauthtoken 8024329***d5ac77" \
-d '{
"mode" :"markAsUnread",
"messageId":"[164522103243001,16452210000001]"
}'
Sample Success Response
Copied{
"status": {
"code": 200,
"description": "success"
}
}
Sample Failure Response
Copied{
"status": {
"code": 500,
"description": "Internal Error"
},
"data": {
"moreInfo": "Internal Error"
}
}