Update Label Details

Purpose

The API updates the particular Label with the given display name and colour.

OAuth Scope

Use the scope

ZohoMail.tags.ALL (or) ZohoMail.tags.UPDATE

to generate the Authtoken.

ALL - Full access to tags.

UPDATE - Provides access to update label details.

Request URL

Method : UPDATE

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.

Request Body ( JSON Object)

  • displayName string
    • Specify a name to the label.
  • color string
    • Specifies a colour for the label using its hexadecimal value.

 

* - Mandatory parameter

Response Codes

Refer here for the response codes and their meaning.

Sample Request

Copiedcurl " https://mail.zoho.com/api/accounts/12345678/labels/2674552000000005002" \
-X PUT \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization:Zoho-oauthtoken ***" 
-d '{
 "displayName": "test"
    "color": "#FFFFF",
}'

Sample Response

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