Method: users.threads.modify
スレッドに適用されたラベルを変更します。これは、スレッド内のすべてのメッセージに適用されます。
HTTP リクエスト
POST https://gmail.googleapis.com/gmail/v1/users/{userId}/threads/{id}/modify
この URL は gRPC Transcoding 構文を使用します。
パスパラメータ
パラメータ |
userId |
string
ユーザーのメールアドレス。特別な値 me を使用して、認証済みユーザーを示すことができます。
|
id |
string
変更するスレッドの ID。
|
リクエスト本文
リクエストの本文には、次の構造のデータが含まれます。
JSON 表現 |
{
"addLabelIds": [
string
],
"removeLabelIds": [
string
]
} |
フィールド |
addLabelIds[] |
string
このスレッドに追加するラベルの ID のリスト。更新ごとに最大 100 個のラベルを追加できます。
|
removeLabelIds[] |
string
このスレッドから削除するラベルの ID のリストです。更新ごとに最大 100 個のラベルを削除できます。
|
レスポンスの本文
成功した場合、レスポンスの本文には Thread
のインスタンスが含まれます。
認可スコープ
次の OAuth スコープのいずれかが必要です。
https://mail.google.com/
https://www.googleapis.com/auth/gmail.modify
詳細については、承認ガイドをご覧ください。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2024-09-05 UTC。
[null,null,["最終更新日 2024-09-05 UTC。"],[[["This method modifies the labels applied to all messages within a specific thread using the thread ID and user ID."],["The request body allows adding or removing labels by specifying their IDs, with a limit of 100 labels per update."],["Upon successful execution, the API returns a detailed representation of the updated thread, including its properties and metadata."],["Authorization requires specific OAuth scopes, such as 'https://mail.google.com/' or 'https://www.googleapis.com/auth/gmail.modify', to grant access and permissions."]]],["This describes modifying thread labels in Gmail via an HTTP POST request to `https://gmail.googleapis.com/gmail/v1/users/{userId}/threads/{id}/modify`. The request requires `userId` (email or `me`) and `id` (thread ID) path parameters. The request body, in JSON format, includes arrays `addLabelIds` and `removeLabelIds` for adding/removing label IDs (up to 100 each). A successful response returns a Thread instance, and authorization requires specific OAuth scopes.\n"]]