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 message. For administrators modifying message 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/{id}/modify

Path parameters

userIdstring required

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

idstring required

The ID of the message to modify.

Request body

removeLabelIdsstring[]

A list IDs of labels to remove from this message. You can remove up to 100 labels with each update.

addLabelIdsstring[]

A list of IDs of labels to add to this message. You can add up to 100 labels with each update.

removeClassificationLabelIdsstring[]

A list of Classification Label values to remove from this message.

Response

Successful response