Method: users.labels.create
HTTP リクエスト
POST https://gmail.googleapis.com/gmail/v1/users/{userId}/labels
この URL は gRPC Transcoding 構文を使用します。
パスパラメータ
パラメータ |
userId |
string
ユーザーのメールアドレス。特別な値 me を使用すると、認証済みユーザーを示すことができます。
|
リクエスト本文
リクエストの本文には Label
のインスタンスが含まれています。
レスポンスの本文
成功した場合、レスポンスの本文には、新しく作成された Label
のインスタンスが含まれます。
認可スコープ
次の OAuth スコープのいずれかが必要です。
https://mail.google.com/
https://www.googleapis.com/auth/gmail.modify
https://www.googleapis.com/auth/gmail.labels
詳細については、承認ガイドをご覧ください。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2024-09-05 UTC。
[null,null,["最終更新日 2024-09-05 UTC。"],[[["Creates a new label for a user's Gmail account using an HTTP POST request."],["Requires providing the user's email address (or `me` for the authenticated user) as a path parameter."],["The request body should contain details of the new label, and a successful response will return the created label details."],["Requires specific authorization scopes, such as `https://mail.google.com/` or `https://www.googleapis.com/auth/gmail.labels`, for access."]]],["This documentation details the process for creating a new label via the Gmail API. A `POST` request is sent to `https://gmail.googleapis.com/gmail/v1/users/{userId}/labels`, with the `userId` path parameter specifying the user. The request body must include a `Label` instance. Successful requests return the newly created `Label` in the response body. Authorization requires specific OAuth scopes, including `https://mail.google.com/` and others. The operation can be tested using the `Try it!` function.\n"]]