Mark Emails as Read

Purpose

This API is used to mark single or multiple emails as read.

OAuth Scope

Use the scope

ZohoMail.messages.ALL (or) ZohoMail.messages.UPDATE

to generate the Authtoken.

ALL - Grants full access to messages.

UPDATE - Grants access to update messages.

Request URL

Method: UPDATE

https://mail.zoho.com/api/accounts/{accountId}/updatemessage

Path Parameters

Request Body (JSON object)

  • mode* string
    • This parameter represents the type of operation that is to be performed.
    • Provide the value as markAsRead.
  • messageId JSON Array of long 
    • This parameter should be passed as an array containing one or more message IDs that need to be marked as read. A message ID is a unique identifier for an email.
    • This parameter can be retrieved from List Emails API.
  • threadId JSON Array of long 
    • This parameter should be passed as an array containing one or more thread IDs that need to be marked as read. A thread ID is a unique identifier for a thread.

* - Mandatory parameter

Response Codes

Refer here for the response codes and their meaning.

Sample Request

Copiedcurl "https://mail.zoho.com/api/accounts/12345678/updatemessage" \
-X PUT \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization:Zoho-oauthtoken *****" \
-d '{
   "mode": "markAsRead",
   "messageId": [1709876190693100009, 1709876188821100007]
}'

Sample Response

Copied{
  "status": {
    "code": 200,
    "description": "success"
  }
}