Get All Label Details

Purpose

This API retrieves all label details for the specified account based on the account ID provided in the request. 

OAuth Scope

Use the scope

ZohoMail.tags.ALL (or) ZohoMail.tags.READ

to generate the Authtoken.

ALL - Full access to tags.

READ - Provides access to read tags.

Request URL

Method : GET

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

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.

 

* - Mandatory parameter

Response Codes

Refer here for the response codes and their meaning.

Sample Response

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

Sample Response

Copied{
"status": {
"code": 200,
"description": "success"
},
"data": [
{
"sequence": 1,
"labelId": "2674552000000009027",
"color": "#96ccf5",
"tagId": "2674552000000009027",
"displayName": "testing",
"URI": "https://mail.zoho.com/api/accounts/12345678/labels/2674552000000009027"
},
{
"sequence": 2,
"labelId": "2674552000000009029",
"color": "#96ccf5",
"tagId": "2674552000000009029",
"displayName": "hello",
"URI": "https://mail.zoho.com/api/accounts/12345678/labels/2674552000000009029"
}
]
}