PUT - Apply Flag to Thread(s)

Purpose

This API is used to apply a flag to single or multiple threads.

OAuth Scope

Use the scope

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

to generate the Authtoken.

ALL - Full access to messages.

UPDATE - Update messages.

Request URL

Method : PUT

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

Path Parameters

  • accountId*long
    • This is the unique identifier for a particular user account.
    • This parameter can be fetched from User Account Details API.

Request Body (JSON Object)

  • mode* string
    • This parameter represents the type of operation that is to be performed.
    • Provide the value as setFlag.
  • threadId* JSON Array of long values
    • This parameter needs to be passed as an array of single or multiple thread IDs for which the flag has to be set.
    • threadId is a unique identifier assigned to a thread.
  • flagId* string
    • This parameter is passed to update threads with the specific flag.
    • The possible value can be
      • 0 - removeFlag
      • 1- info
      • 2 - important
      • 3 - followup
  • isArchive boolean
    • This parameter indicates whether the threads to be flagged are archived or not.
    • The possible value can be
      • true - If the email threads are archived.
      • false - If the email threads are not archived.
  • isFolderSpecific boolean
    • This parameter indicates whether the threads to be flagged are specific to a folder or not.
    • The possible value can be
      • true - If folder specific.
      • false - If not folder specific
  • folderId string
    • This parameter represents the ID of the folder whose email threads need to be flagged.
    • This is a mandatory parameter if the 'isFolderSpecific' parameter has the value 'true'.

 

* - Mandatory parameter.

Response Codes

Refer here for the response codes and their meaning.

Sample request

Copied{
    "mode": "setFlag",
    "flagid": "1"
    "threadId": [
        313214315678
    ]
}