Mark Emails as Read

Purpose

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

OAuth Scope

Use the scope

MailApps.messages.ALL (or) MailApps.messages.UPDATE

ALL  Full access to the messages.

UPDATE  Mark the email as read.

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 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.

 

* - 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/x7**00s/messages" \
-X PUT \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization:Zoho-oauthtoken 80**74d5ac77" \
-d '{
  "mode" :"markAsRead",
  "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"
    }
}