Update a tag
Renames a tag or changes its color. The tagId path parameter accepts either the numeric tag ID (long as string) or the tag name - the server resolves names to IDs automatically. Both tagName and tagColor must be provided in the request body.
Endpoint
Request URL
https://mail.zoho.com/api/v2/sharedmailbox/{mailboxIdentifier}/tags/{tagId} Copied!
Note:
Use the request URL with the domain that matches the DC where your account is hosted. Refer Multiple data centers section for data center information.
Scope
Request Parameters
- Path Parameters
Email address or numeric zgid (group ID) of the shared mailbox group.
Numeric tag ID (long as string) or tag name. The server resolves tag names to IDs automatically.
- Request Body
application/json
Request body for creating or updating a tag.
Show Sub-Attributes
Color code for the tag (e.g. a hex color value like '#FF5733').
Display name of the tag.
Sample Request
curl --request PUT \
--url https://mail.zoho.com/api/v2/sharedmailbox/support@zylker.com/tags/3001234567890 \
--header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \
--header 'content-type: application/json' \
--data '{"tagColor":"#FF5733","tagName":"Urgent"}'import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.io.IOException;
import java.net.http.HttpTimeoutException;
public class Main {
public static void main(String[] args) throws Exception{
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://mail.zoho.com/api/v2/sharedmailbox/support@zylker.com/tags/3001234567890"))
.header("content-type", "application/json")
.header("Authorization", "Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\"tagColor\":\"#FF5733\",\"tagName\":\"Urgent\"}"))
.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
import http.client
conn = http.client.HTTPSConnection("mail.zoho.com")
payload = "{\"tagColor\":\"#FF5733\",\"tagName\":\"Urgent\"}"
headers = {
'content-type': "application/json",
'Authorization': "Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52"
}
conn.request("PUT", "/api/v2/sharedmailbox/support@zylker.com/tags/3001234567890", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
headersMap = Map();
headersMap.put("Content-Type", "application/json");
headersMap.put("Accept", "application/json");
data=Map();
data.put("tagColor","#FF5733");
data.put("tagName","Urgent");
response = invokeUrl
[
url: "https://mail.zoho.com/api/v2/sharedmailbox/{mailboxIdentifier}/tags/{tagId}"
type: PUT
headers: headersMap
body: data
connection: connection_name
]
info response;
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://mail.zoho.com/api/v2/sharedmailbox/support@zylker.com/tags/3001234567890",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "{\"tagColor\":\"#FF5733\",\"tagName\":\"Urgent\"}",
CURLOPT_HTTPHEADER => [
"Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}Sample Request Body
{
"tagColor": "#FF5733",
"tagName": "Urgent"
}
Response Parameters
- HTTP code 200
Response Body - application/json
Response envelope for a single shared mailbox tag.
Show Sub-Attributes
The created or updated tag.
{
"tagId": "3001234567890",
"tagColor": "#FF5733",
"tagName": "Urgent"
}Show Sub-Attributes
Unique numeric ID of the tag (long as string).
Color code of the tag (e.g. a hex color value like '#FF5733').
Display name of the tag.
Unique identifier for the request, useful for support and tracing.
Request status code and description (200 on success).
{
"code": 200,
"description": "OK"
}Show Sub-Attributes
HTTP-style numeric status code returned by the API (e.g. 200 for success).
Human-readable text describing the outcome of the request.
- HTTP code 400
Response Body - application/json
Standard error envelope returned for failed requests. Exactly one of 'error' (single error) or 'errors' (multiple validation errors) is present.
Show Sub-Attributes
Unique identifier of the request, useful for support and tracing.
Details of a single error, present when the request fails with one error.
{
"errorMessage": "The 'view' path parameter must be one of: all, unread, unassigned, assigned, archived, spam, trash.",
"errorCode": "INVALID_INPUT",
"locationType": "pathParam",
"location": "view"
}Show Sub-Attributes
Human-readable description of the error.
Application-level error code. INVALID_INPUT for client-side failures (400, 401, 403, 404); INTERNAL_SERVER_ERROR for unexpected server failures (500).
Where the offending input was supplied. Omitted when 'location' is omitted.
Name of the path parameter, query parameter or request body field that caused the error. Omitted when the error is not tied to a specific input.
List of errors returned when a request fails validation on multiple parameters.
Show Sub-Attributes
Details of a single error. 'location' and 'locationType' are present only when the error is attributable to a specific input.
Show Sub-Attributes
Human-readable description of the error.
Application-level error code. INVALID_INPUT for client-side failures (400, 401, 403, 404); INTERNAL_SERVER_ERROR for unexpected server failures (500).
Where the offending input was supplied. Omitted when 'location' is omitted.
Name of the path parameter, query parameter or request body field that caused the error. Omitted when the error is not tied to a specific input.
HTTP-like status code and human-readable description of the error.
{
"code": 200,
"description": "OK"
}Show Sub-Attributes
HTTP-style numeric status code returned by the API (e.g. 200 for success).
Human-readable text describing the outcome of the request.
- HTTP code 401
Response Body - application/json
Standard error envelope returned for failed requests. Exactly one of 'error' (single error) or 'errors' (multiple validation errors) is present.
Show Sub-Attributes
Unique identifier of the request, useful for support and tracing.
Details of a single error, present when the request fails with one error.
{
"errorMessage": "The 'view' path parameter must be one of: all, unread, unassigned, assigned, archived, spam, trash.",
"errorCode": "INVALID_INPUT",
"locationType": "pathParam",
"location": "view"
}Show Sub-Attributes
Human-readable description of the error.
Application-level error code. INVALID_INPUT for client-side failures (400, 401, 403, 404); INTERNAL_SERVER_ERROR for unexpected server failures (500).
Where the offending input was supplied. Omitted when 'location' is omitted.
Name of the path parameter, query parameter or request body field that caused the error. Omitted when the error is not tied to a specific input.
List of errors returned when a request fails validation on multiple parameters.
Show Sub-Attributes
Details of a single error. 'location' and 'locationType' are present only when the error is attributable to a specific input.
Show Sub-Attributes
Human-readable description of the error.
Application-level error code. INVALID_INPUT for client-side failures (400, 401, 403, 404); INTERNAL_SERVER_ERROR for unexpected server failures (500).
Where the offending input was supplied. Omitted when 'location' is omitted.
Name of the path parameter, query parameter or request body field that caused the error. Omitted when the error is not tied to a specific input.
HTTP-like status code and human-readable description of the error.
{
"code": 200,
"description": "OK"
}Show Sub-Attributes
HTTP-style numeric status code returned by the API (e.g. 200 for success).
Human-readable text describing the outcome of the request.
- HTTP code 403
Response Body - application/json
Standard error envelope returned for failed requests. Exactly one of 'error' (single error) or 'errors' (multiple validation errors) is present.
Show Sub-Attributes
Unique identifier of the request, useful for support and tracing.
Details of a single error, present when the request fails with one error.
{
"errorMessage": "The 'view' path parameter must be one of: all, unread, unassigned, assigned, archived, spam, trash.",
"errorCode": "INVALID_INPUT",
"locationType": "pathParam",
"location": "view"
}Show Sub-Attributes
Human-readable description of the error.
Application-level error code. INVALID_INPUT for client-side failures (400, 401, 403, 404); INTERNAL_SERVER_ERROR for unexpected server failures (500).
Where the offending input was supplied. Omitted when 'location' is omitted.
Name of the path parameter, query parameter or request body field that caused the error. Omitted when the error is not tied to a specific input.
List of errors returned when a request fails validation on multiple parameters.
Show Sub-Attributes
Details of a single error. 'location' and 'locationType' are present only when the error is attributable to a specific input.
Show Sub-Attributes
Human-readable description of the error.
Application-level error code. INVALID_INPUT for client-side failures (400, 401, 403, 404); INTERNAL_SERVER_ERROR for unexpected server failures (500).
Where the offending input was supplied. Omitted when 'location' is omitted.
Name of the path parameter, query parameter or request body field that caused the error. Omitted when the error is not tied to a specific input.
HTTP-like status code and human-readable description of the error.
{
"code": 200,
"description": "OK"
}Show Sub-Attributes
HTTP-style numeric status code returned by the API (e.g. 200 for success).
Human-readable text describing the outcome of the request.
- HTTP code 404
Response Body - application/json
Standard error envelope returned for failed requests. Exactly one of 'error' (single error) or 'errors' (multiple validation errors) is present.
Show Sub-Attributes
Unique identifier of the request, useful for support and tracing.
Details of a single error, present when the request fails with one error.
{
"errorMessage": "The 'view' path parameter must be one of: all, unread, unassigned, assigned, archived, spam, trash.",
"errorCode": "INVALID_INPUT",
"locationType": "pathParam",
"location": "view"
}Show Sub-Attributes
Human-readable description of the error.
Application-level error code. INVALID_INPUT for client-side failures (400, 401, 403, 404); INTERNAL_SERVER_ERROR for unexpected server failures (500).
Where the offending input was supplied. Omitted when 'location' is omitted.
Name of the path parameter, query parameter or request body field that caused the error. Omitted when the error is not tied to a specific input.
List of errors returned when a request fails validation on multiple parameters.
Show Sub-Attributes
Details of a single error. 'location' and 'locationType' are present only when the error is attributable to a specific input.
Show Sub-Attributes
Human-readable description of the error.
Application-level error code. INVALID_INPUT for client-side failures (400, 401, 403, 404); INTERNAL_SERVER_ERROR for unexpected server failures (500).
Where the offending input was supplied. Omitted when 'location' is omitted.
Name of the path parameter, query parameter or request body field that caused the error. Omitted when the error is not tied to a specific input.
HTTP-like status code and human-readable description of the error.
{
"code": 200,
"description": "OK"
}Show Sub-Attributes
HTTP-style numeric status code returned by the API (e.g. 200 for success).
Human-readable text describing the outcome of the request.
- HTTP code 429
Response Body - application/json
Standard error envelope returned for failed requests. Exactly one of 'error' (single error) or 'errors' (multiple validation errors) is present.
Show Sub-Attributes
Unique identifier of the request, useful for support and tracing.
Details of a single error, present when the request fails with one error.
{
"errorMessage": "The 'view' path parameter must be one of: all, unread, unassigned, assigned, archived, spam, trash.",
"errorCode": "INVALID_INPUT",
"locationType": "pathParam",
"location": "view"
}Show Sub-Attributes
Human-readable description of the error.
Application-level error code. INVALID_INPUT for client-side failures (400, 401, 403, 404); INTERNAL_SERVER_ERROR for unexpected server failures (500).
Where the offending input was supplied. Omitted when 'location' is omitted.
Name of the path parameter, query parameter or request body field that caused the error. Omitted when the error is not tied to a specific input.
List of errors returned when a request fails validation on multiple parameters.
Show Sub-Attributes
Details of a single error. 'location' and 'locationType' are present only when the error is attributable to a specific input.
Show Sub-Attributes
Human-readable description of the error.
Application-level error code. INVALID_INPUT for client-side failures (400, 401, 403, 404); INTERNAL_SERVER_ERROR for unexpected server failures (500).
Where the offending input was supplied. Omitted when 'location' is omitted.
Name of the path parameter, query parameter or request body field that caused the error. Omitted when the error is not tied to a specific input.
HTTP-like status code and human-readable description of the error.
{
"code": 200,
"description": "OK"
}Show Sub-Attributes
HTTP-style numeric status code returned by the API (e.g. 200 for success).
Human-readable text describing the outcome of the request.
- HTTP code 500
Response Body - application/json
Standard error envelope returned for failed requests. Exactly one of 'error' (single error) or 'errors' (multiple validation errors) is present.
Show Sub-Attributes
Unique identifier of the request, useful for support and tracing.
Details of a single error, present when the request fails with one error.
{
"errorMessage": "The 'view' path parameter must be one of: all, unread, unassigned, assigned, archived, spam, trash.",
"errorCode": "INVALID_INPUT",
"locationType": "pathParam",
"location": "view"
}Show Sub-Attributes
Human-readable description of the error.
Application-level error code. INVALID_INPUT for client-side failures (400, 401, 403, 404); INTERNAL_SERVER_ERROR for unexpected server failures (500).
Where the offending input was supplied. Omitted when 'location' is omitted.
Name of the path parameter, query parameter or request body field that caused the error. Omitted when the error is not tied to a specific input.
List of errors returned when a request fails validation on multiple parameters.
Show Sub-Attributes
Details of a single error. 'location' and 'locationType' are present only when the error is attributable to a specific input.
Show Sub-Attributes
Human-readable description of the error.
Application-level error code. INVALID_INPUT for client-side failures (400, 401, 403, 404); INTERNAL_SERVER_ERROR for unexpected server failures (500).
Where the offending input was supplied. Omitted when 'location' is omitted.
Name of the path parameter, query parameter or request body field that caused the error. Omitted when the error is not tied to a specific input.
HTTP-like status code and human-readable description of the error.
{
"code": 200,
"description": "OK"
}Show Sub-Attributes
HTTP-style numeric status code returned by the API (e.g. 200 for success).
Human-readable text describing the outcome of the request.
Sample Response: HTTP 200
{
"data": {
"tagId": "3001234567890",
"tagColor": "#FF5733",
"tagName": "Urgent"
},
"requestId": "zmreq-abc12345-def6-7890",
"status": {
"code": 200,
"description": "OK"
}
}
Sample Response: HTTP 400
{
"requestId": "zmreq-abc12345-def6-7890",
"error": {
"errorMessage": "The 'tagName' and 'tagColor' fields are required. 'tagColor' must be a hex colour code such as #FF5733.",
"errorCode": "INVALID_INPUT",
"locationType": "requestBody",
"location": "tagName"
},
"status": {
"code": 400,
"description": "Bad Request"
}
}
Sample Response: HTTP 401
{
"requestId": "zmreq-abc12345-def6-7890",
"error": {
"errorMessage": "The OAuth access token is missing, malformed or has expired.",
"errorCode": "INVALID_INPUT"
},
"status": {
"code": 401,
"description": "Unauthorized"
}
}
Sample Response: HTTP 403
{
"requestId": "zmreq-abc12345-def6-7890",
"error": {
"errorMessage": "The authenticated user does not have permission to perform this operation on this shared mailbox.",
"errorCode": "INVALID_INPUT"
},
"status": {
"code": 403,
"description": "Forbidden"
}
}
Sample Response: HTTP 404
{
"requestId": "zmreq-abc12345-def6-7890",
"error": {
"errorMessage": "Tag '3001234567890' was not found in this shared mailbox.",
"errorCode": "INVALID_INPUT"
},
"status": {
"code": 404,
"description": "Not Found"
}
}
Sample Response: HTTP 429
{
"requestId": "zmreq-abc12345-def6-7890",
"error": {
"errorMessage": "The rate limit for this API has been exceeded. Retry after the lock period has elapsed.",
"errorCode": "INVALID_INPUT"
},
"status": {
"code": 429,
"description": "Too Many Requests"
}
}
Sample Response: HTTP 500
{
"requestId": "zmreq-abc12345-def6-7890",
"error": {
"errorMessage": "Something went wrong. Please try again later.",
"errorCode": "INTERNAL_SERVER_ERROR"
},
"status": {
"code": 500,
"description": "Internal Server Error"
}
}
© 2026, Zoho Corporation Pvt. Ltd. All Rights Reserved.