Skip to main content

labels

Overview

Namelabels
TypeResource
Idgoogleworkspace.gmail.labels

Fields

NameDatatypeDescription
idstringThe immutable ID of the label.
namestringThe display name of the label.
messageListVisibilitystringThe visibility of messages with this label in the message list in the Gmail web interface.
messagesUnreadintegerThe number of unread messages with the label.
threadsTotalintegerThe total number of threads with the label.
colorobject
labelListVisibilitystringThe visibility of the label in the label list in the Gmail web interface.
typestringThe 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.
messagesTotalintegerThe total number of messages with the label.
threadsUnreadintegerThe number of unread threads with the label.

Methods

NameAccessible byRequired ParamsDescription
users_labels_getSELECTid, userIdGets the specified label.
users_labels_listSELECTuserIdLists all labels in the user's mailbox.
users_labels_createINSERTuserIdCreates a new label.
users_labels_deleteDELETEid, userIdImmediately and permanently deletes the specified label and removes it from any messages and threads that it is applied to.
users_labels_patchEXECid, userIdPatch the specified label.
users_labels_updateEXECid, userIdUpdates the specified label.