Delete a Thread

Purpose

This API is used to delete a thread in an account.

OAuth Scope

Use the scope

MailApps.messages.ALL (or) MailApps.messages.DELETE

ALL - Full access to the messages.

DELETE - Delete a thread.

To generate Authtoken, refer here.

Request URL

Method: DELETE

https://mail360.zoho.com/api/accounts/{account_key}/threads/{threadId}

Path Parameters    

  • account_key* string   
    • This key is used to identify the account in which the thread has to be deleted. It is generated during account addition.
    • This parameter be fetched using the Get All Accounts API.
  • threadId* long   
    • threadId is a unique identifier assigned to a thread.
    • This parameter be fetched using the Get All Threads API.

Query Parameters    

  • expunge boolean   
    • This parameter specifies whether the thread needs to be deleted from the trash or not.
    • The value can be
      • true - delete from trash too.
      • false - move to trash.
    • The default value is false.

 

* - 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/16759494085221****1" \
-X DELETE \
-H "Accept: application/json" \
-H "Authorization:Zoho-oauthtoken ***" 

Sample Success Response

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

Sample Failure Response

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