v1

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

Updates the specified label. For more information, see Manage labels.

put/gmail/v1/users/{userId}/labels/{id}

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 label to update.

Request body

idstring

The immutable ID of the label.

messageListVisibility'show' | 'hide'

The visibility of messages with this label in the message list in the Gmail web interface.

labelListVisibility'labelShow' | 'labelShowIfUnread' | 'labelHide'

The visibility of the label in the label list in the Gmail web interface.

threadsUnreadinteger

The number of unread threads with the label.

messagesUnreadinteger

The number of unread messages with the label.

namestring

The display name of the label.

type'system' | 'user'

The owner type for the label. User labels are created by the user and can be modified and deleted by the user and can be applied to any message or thread. System labels are internally created and cannot be added, modified, or deleted. System labels may be able to be applied to or removed from messages and threads under some circumstances but this is not guaranteed. For example, users can apply and remove the INBOX and UNREAD labels from messages and threads, but cannot apply or remove the DRAFTS or SENT labels from messages or threads.

messagesTotalinteger

The total number of messages with the label.

threadsTotalinteger

The total number of threads with the label.

Response

Successful response