Mark Threads
Purpose
This API is used to mark single or multiple threads as read/unread in an account.
OAuth Scope
Use the scope
MailApps.messages.ALL (or) MailApps.messages.UPDATE
ALL - Full access to the messages.
UPDATE - Update threads.
To generate Authtoken, refer here.
Request URL
Method: PUT
https://mail360.zoho.com/api/accounts/{account_key}/threads
Path Parameters
- account_key* string
- This key is used to identify the account in which the threads have to be updated. It is generated during account addition.
Request Body (JSON Object)
- mode* string
- This parameter specifies whether to mark the threads as read or unread.
- The value can be
- markAsUnread
- markAsRead
- threadId* JSON Array of long
- This parameter needs to be passed as an array of single or multiple thread Ids which need to be marked as read/unread.
- threadId is a unique identifier assigned to a thread.
* - Mandatory parameter
Note:
While Messages APIs focus on retrieving individual messages, the Threads APIs are used to retrieve complete conversation threads containing multiple messages.
Sample Request
Copiedcurl "https://mail360.zoho.com/api/accounts/N7A**0CM/threads" \
-X PUT \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization:Zoho-oauthtoken ***" \
-d '{
"mode" :"markAsRead",
"threadId":"[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"
}
}