ラベルを管理するには、https://www.googleapis.com/auth/gmail.labels スコープを使用する必要があります。スコープの詳細については、Gmail API 固有の認可と認証情報をご覧ください。
ラベルの種類
ラベルには、予約済みの SYSTEM ラベルとカスタムの USER ラベルの 2 種類があります。通常、システムラベルは、Gmail ウェブ インターフェースの受信トレイなどの事前定義された要素に対応しています。システムラベル名は予約されています。SYSTEM ラベルと同じ名前の USER ラベルを作成することはできません。次の表に、よく使用される Gmail システムラベルの一部を示します。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-07-31 UTC。"],[],[],null,["You can use labels to tag, organize, and categorize messages and threads\nin Gmail. A label has a many-to-many relationship with messages and\nthreads: you can apply multiple labels to a single message or thread\nand apply a single label to multiple messages or threads.\n\nFor information about how to\n[create](/workspace/gmail/api/v1/reference/users/labels/create),\n[get](/workspace/gmail/api/v1/reference/users/labels/get),\n[list](/workspace/gmail/api/v1/reference/users/labels/list),\n[update](/workspace/gmail/api/v1/reference/users/labels/update),\nor [delete](/workspace/gmail/api/v1/reference/users/labels/delete) labels, see the\n[Labels reference](/workspace/gmail/api/v1/reference/users/labels).\n\nTo manage labels, you must use the\n`https://www.googleapis.com/auth/gmail.labels` scope. For more information\nabout scopes, see\n[Gmail API-specific authorization and authentication information](/workspace/gmail/api/auth/scopes).\n\nTypes of labels\n\nLabels come in two varieties: reserved `SYSTEM` labels and custom `USER` labels.\nSystem labels typically correspond to pre-defined elements in the Gmail web\ninterface such as the inbox. Systems label names are reserved; no `USER` label can\nbe created with the same name as any `SYSTEM` label. The following table lists\nseveral of the most common Gmail system labels:\n\n| Name | Can be manually applied | Notes |\n|-----------------------|-------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `INBOX` | yes | |\n| `SPAM` | yes | |\n| `TRASH` | yes | |\n| `UNREAD` | yes | |\n| `STARRED` | yes | |\n| `IMPORTANT` | yes | |\n| `SENT` | no | Applied automatically to messages that are sent with [`drafts.send`](/workspace/gmail/api/v1/reference/users/drafts/send) or [`messages.send`](/workspace/gmail/api/v1/reference/users/messages/send), inserted with [`messages.insert`](/workspace/gmail/api/v1/reference/users/messages/insert) and the user's email in the `From` header, or sent by the user through the web interface. |\n| `DRAFT` | no | Automatically applied to all [`draft`](/workspace/gmail/api/v1/reference/users/drafts) messages created with the Gmail API or Gmail interface. |\n| `CATEGORY_PERSONAL` | yes | Corresponds to messages that are displayed in the Personal tab of the Gmail interface. |\n| `CATEGORY_SOCIAL` | yes | Corresponds to messages that are displayed in the Social tab of the Gmail interface. |\n| `CATEGORY_PROMOTIONS` | yes | Corresponds to messages that are displayed in the Promotions tab of the Gmail interface. |\n| `CATEGORY_UPDATES` | yes | Corresponds to messages that are displayed in the Updates tab of the Gmail interface. |\n| `CATEGORY_FORUMS` | yes | Corresponds to messages that are displayed in the Forums tab of the Gmail interface. |\n\n| **Note:** The above list is not exhaustive and other reserved label names exist. Attempting to create a custom label with a name that conflicts with a reserved name results in an `HTTP 400 - Invalid label name` error.\n\nManage labels on messages \\& threads\n\nLabels only exist on messages. For instance, if you list labels on a thread, you\nget a list of labels that exist on any of the messages within the thread. A\nlabel might not exist on every message within a thread. You can apply\nmultiple labels to messages, but you can't apply\nlabels to draft messages.\n\nAdd or remove labels to threads\n\nWhen you add or remove a label to a thread, you add or remove the specified\nlabel on all existing messages in the thread.\n\nIf messages are added to a thread after you add a label, the new messages\ndon't inherit the existing label associated with the thread. To add the label\nto those messages, add the label to the thread again.\n\nTo add or remove the labels associated with a thread, use\n[`threads.modify`](/workspace/gmail/api/v1/reference/users/threads/modify).\n\nAdd or remove labels to messages\n\nWhen you add a label to a message, the label is added to that message and\nbecomes associated with the thread to which the message belongs. The label isn't\nadded to other messages within the thread.\n\nIf you remove a label from a message and it was the only message in the thread\nwith that label, the label is also removed from the thread.\n\nTo add or remove the labels applied to a message, use\n[`messages.modify`](/workspace/gmail/api/v1/reference/users/messages/modify)."]]