Update a Label

Purpose 

This API is used to update a specific label associated with the label ID.

OAuth Scope

Use the scope

MailApps.tags.ALL (or) MailApps.tags.UPDATE

ALL - Full access to labels

UPDATE - Update a label.

To generate Authtoken, refer here.

Request URL

Method: PUT

https://mail360.zoho.com/api/accounts/{account_key}/labels/{labelid}

Path Parameters

  • account_key* string
    • This is a unique key used to identify the mailbox. It is generated during account addition.
    • This parameter can be fetched from Get all accounts API.
  • labelid* long
    • This is a unique key used to identify the specific label. It is generated during label creation.
    • This parameter can be fetched from Get all labels API.

Request Body(JSON Object)

  • displayName  string
    • This parameter specifies the new name of the specific label.
  • color string
    • This parameter refers to the color you prefer to associate with the specific label.
    • The value should be given as a Hex representation of the color.

Sample Request

Copiedcurl "https://mail360.zoho.com/api/accounts/x7**0s/labels/182024000000016004" \
-X PUT \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization:Zoho-oauthtoken 8024329**b4ac3" \
-d '{
    "displayName":"updated",
    "color":"#FFFFFF"
    }'

Sample response

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