Move Threads

Purpose

This API is used to move single or multiple threads to a different folder.

OAuth Scope

Use the scope

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

ALL - Full access to the messages.

UPDATE - Move 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. It is generated during account addition.
    • This parameter can be fetched 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 moveMessage.
  • threadId* JSON Array of long values
    • This parameter needs to be passed as an array of single or multiple thread IDs of threads which has to be moved to the specified destination folder.
    • threadId is a unique identifier assigned to a thread.
  • destfolderId* long
    • This parameter specifies the ID of the destination folder to which threads need to be moved.

 

* - 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/N7A**0CM/threads" \
-X PUT \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization:Zoho-oauthtoken ***" \
-d '{
  "mode" :"moveMessage",
  "threadId":"[164522103243001,16452210000001]",
  "destfolderId":"1233355667"
}'

Sample Success Response

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

Sample Failure Response

Copied{
   "status": {
       "code": 500,
       "description": "Internal Error"
   },
   "data": {
       "moreInfo": "Internal Error"
   }
}