v1

latestOpenAPI 3.0.0Creative Commons Attribution 3.02026-07-137956179.1 KB
users

Modifies the labels and the Classification Label values on the specified messages. For administrators modifying messages for users in their organization, requests require authorization with a service account that has domain-wide delegation authority to impersonate users with the https://www.googleapis.com/auth/gmail.modify.restricted scope.

post/gmail/v1/users/{userId}/messages/batchModify

Path parameters

userIdstring required

The user's email address. The special value me can be used to indicate the authenticated user.

Request body

removeClassificationLabelIdsstring[]

A list of Classification Label values to remove from messages.

idsstring[]

The IDs of the messages to modify. There is a limit of 1000 ids per request.

addLabelIdsstring[]

A list of label IDs to add to messages.

removeLabelIdsstring[]

A list of label IDs to remove from messages.

Response

Successful response