Remove tags from a message
Removes one or more tags from a single shared mailbox message. Provide either tagIds or tagNames (mutually exclusive, up to 50 each).
Endpoint
Request URL
https://mail.zoho.com/api/v2/sharedmailbox/{mailboxIdentifier}/messages/{messageId}/tags/remove 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 ID of the message (long as string).
- Request Body
application/json
Request body for adding or removing tags from a single message. Provide either tagIds or tagNames - they are mutually exclusive.
Show Sub-Attributes
Numeric tag IDs (long as string each). Mutually exclusive with tagNames.
Tag names; resolved server-side to IDs. Mutually exclusive with tagIds.
Sample Request
curl --request PUT \
--url https://mail.zoho.com/api/v2/sharedmailbox/support@zylker.com/messages/1001234567890/tags/remove \
--header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \
--header 'content-type: application/json' \
--data '{"tagIds":["3001234567890","3001234567891"]}'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/messages/1001234567890/tags/remove"))
.header("content-type", "application/json")
.header("Authorization", "Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\"tagIds\":[\"3001234567890\",\"3001234567891\"]}"))
.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 = "{\"tagIds\":[\"3001234567890\",\"3001234567891\"]}"
headers = {
'content-type': "application/json",
'Authorization': "Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52"
}
conn.request("PUT", "/api/v2/sharedmailbox/support@zylker.com/messages/1001234567890/tags/remove", 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_tagIds=List();
data_tagIds.add("3001234567890");
data.put("tagIds",data_tagIds);
response = invokeUrl
[
url: "https://mail.zoho.com/api/v2/sharedmailbox/{mailboxIdentifier}/messages/{messageId}/tags/remove"
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/messages/1001234567890/tags/remove",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "{\"tagIds\":[\"3001234567890\",\"3001234567891\"]}",
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
{
"tagIds": [
"3001234567890",
"3001234567891"
]
}
Response Parameters
- HTTP code 200
Response Body - application/json
Standard response for write/action operations that do not return a specific resource.
Show Sub-Attributes
Operation result data. May include entityId or a status indicator depending on the operation.
Show Sub-Attributes
ID of the affected entity, when applicable (long as string).
Operation outcome indicator (e.g. 'success').
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": {
"entityId": "1001234567890",
"status": "success"
},
"requestId": "zmreq-abc12345-def6-7890",
"status": {
"code": 200,
"description": "OK"
}
}
Sample Response: HTTP 400
{
"requestId": "zmreq-abc12345-def6-7890",
"error": {
"errorMessage": "Provide either 'tagIds' or 'tagNames' with at least one entry.",
"errorCode": "INVALID_INPUT",
"locationType": "requestBody",
"location": "tagIds"
},
"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": "Message '1001234567890' 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.