Delete a Label

Purpose

The API deletes the label and removes the label from all the associated messages. 

OAuth Scope

Use the scope

ZohoMail.tags.ALL (or) ZohoMail.tags.DELETE

to generate the Authtoken.

ALL - Full access to tags.

DELETE - Provides access to delete labels.

Request URL

Method : DELETE

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

Path Parameters

  • accountIdlong
    • This parameter is used to identify the account whose details are retrieved.
    • This parameter can be retrieved from the Get User Account Details API.
  • labelIdlong
    • This parameter is used to identify the label whose details are retrieved.
    • This parameter can be retrieved from the Get All Label Details API.

 

* - Mandatory parameter

Response Codes

Refer here for the response codes and their meaning.

Sample Request

Copiedcurl "https://mail.zoho.com/api/accounts/12345678/labels/2674552000000009027" \
-X DELETE \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization:Zoho-oauthtoken ***" 

Sample Response

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