{"resources":{"users":{"methods":{"getProfile":{"scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.compose","https://www.googleapis.com/auth/gmail.metadata","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly"],"parameterOrder":["userId"],"httpMethod":"GET","path":"gmail/v1/users/{userId}/profile","parameters":{"userId":{"required":true,"default":"me","type":"string","location":"path","description":"The user's email address. The special value `me` can be used to indicate the authenticated user."}},"flatPath":"gmail/v1/users/{userId}/profile","response":{"$ref":"Profile"},"description":"Gets the current user's Gmail profile.","id":"gmail.users.getProfile"},"watch":{"request":{"$ref":"WatchRequest"},"flatPath":"gmail/v1/users/{userId}/watch","response":{"$ref":"WatchResponse"},"parameters":{"userId":{"type":"string","default":"me","required":true,"description":"The user's email address. The special value `me` can be used to indicate the authenticated user.","location":"path"}},"description":"Set up or update a push notification watch on the given user mailbox. For more information, see [Configure push notifications in Gmail API](https://developers.google.com/workspace/gmail/api/guides/push).","id":"gmail.users.watch","scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.metadata","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly"],"httpMethod":"POST","parameterOrder":["userId"],"path":"gmail/v1/users/{userId}/watch"},"stop":{"scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.metadata","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly"],"parameters":{"userId":{"default":"me","type":"string","required":true,"description":"The user's email address. The special value `me` can be used to indicate the authenticated user.","location":"path"}},"flatPath":"gmail/v1/users/{userId}/stop","parameterOrder":["userId"],"httpMethod":"POST","description":"Turn off push notification delivery for the given user mailbox. For more information, see [Configure push notifications in Gmail API](https://developers.google.com/workspace/gmail/api/guides/push).","id":"gmail.users.stop","path":"gmail/v1/users/{userId}/stop"}},"resources":{"messages":{"methods":{"send":{"id":"gmail.users.messages.send","mediaUpload":{"protocols":{"resumable":{"path":"/resumable/upload/gmail/v1/users/{userId}/messages/send","multipart":true},"simple":{"path":"/upload/gmail/v1/users/{userId}/messages/send","multipart":true}},"maxSize":"36700160","accept":["message/*"]},"description":"Sends the specified message to the recipients in the `To`, `Cc`, and `Bcc` headers. For more information, see [Create and send email messages](https://developers.google.com/workspace/gmail/api/guides/sending).","parameters":{"userId":{"type":"string","default":"me","required":true,"description":"The user's email address. The special value `me` can be used to indicate the authenticated user.","location":"path"}},"flatPath":"gmail/v1/users/{userId}/messages/send","response":{"$ref":"Message"},"request":{"$ref":"Message"},"path":"gmail/v1/users/{userId}/messages/send","parameterOrder":["userId"],"httpMethod":"POST","supportsMediaUpload":true,"scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.addons.current.action.compose","https://www.googleapis.com/auth/gmail.compose","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.send"]},"batchModify":{"scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify"],"path":"gmail/v1/users/{userId}/messages/batchModify","httpMethod":"POST","parameterOrder":["userId"],"flatPath":"gmail/v1/users/{userId}/messages/batchModify","parameters":{"userId":{"description":"The user's email address. The special value `me` can be used to indicate the authenticated user.","location":"path","type":"string","default":"me","required":true}},"request":{"$ref":"BatchModifyMessagesRequest"},"id":"gmail.users.messages.batchModify","description":"Modifies the labels and the Classification Label values on the specified messages. For administrators modifying messages for users in their organization, requests require authorization with a [service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation authority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with the `https://www.googleapis.com/auth/gmail.modify.restricted` scope."},"trash":{"httpMethod":"POST","parameterOrder":["userId","id"],"path":"gmail/v1/users/{userId}/messages/{id}/trash","scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify"],"description":"Moves the specified message to the trash.","id":"gmail.users.messages.trash","flatPath":"gmail/v1/users/{userId}/messages/{id}/trash","response":{"$ref":"Message"},"parameters":{"userId":{"location":"path","description":"The user's email address. The special value `me` can be used to indicate the authenticated user.","required":true,"default":"me","type":"string"},"id":{"description":"The ID of the message to Trash.","type":"string","location":"path","required":true}}},"batchDelete":{"id":"gmail.users.messages.batchDelete","description":"Deletes many messages by message ID. Provides no guarantees that messages were not already deleted or even existed at all.","parameters":{"userId":{"type":"string","default":"me","required":true,"description":"The user's email address. The special value `me` can be used to indicate the authenticated user.","location":"path"}},"flatPath":"gmail/v1/users/{userId}/messages/batchDelete","request":{"$ref":"BatchDeleteMessagesRequest"},"path":"gmail/v1/users/{userId}/messages/batchDelete","parameterOrder":["userId"],"httpMethod":"POST","scopes":["https://mail.google.com/"]},"modify":{"request":{"$ref":"ModifyMessageRequest"},"parameters":{"userId":{"description":"The user's email address. The special value `me` can be used to indicate the authenticated user.","location":"path","type":"string","default":"me","required":true},"id":{"description":"The ID of the message to modify.","type":"string","location":"path","required":true}},"flatPath":"gmail/v1/users/{userId}/messages/{id}/modify","response":{"$ref":"Message"},"description":"Modifies the labels and the Classification Label values on the specified message. For administrators modifying message for users in their organization, requests require authorization with a [service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation authority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with the `https://www.googleapis.com/auth/gmail.modify.restricted` scope.","id":"gmail.users.messages.modify","scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify"],"parameterOrder":["userId","id"],"httpMethod":"POST","path":"gmail/v1/users/{userId}/messages/{id}/modify"},"import":{"supportsMediaUpload":true,"scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.insert","https://www.googleapis.com/auth/gmail.modify"],"path":"gmail/v1/users/{userId}/messages/import","httpMethod":"POST","parameterOrder":["userId"],"flatPath":"gmail/v1/users/{userId}/messages/import","response":{"$ref":"Message"},"parameters":{"internalDateSource":{"default":"dateHeader","enumDescriptions":["Internal message date set to current time when received by Gmail.","Internal message time based on 'Date' header in email, when valid."],"enum":["receivedTime","dateHeader"],"type":"string","location":"query","description":"Source for Gmail's internal date of the message."},"deleted":{"location":"query","description":"Mark the email as permanently deleted (not TRASH) and only visible in Google Vault to a Vault administrator. Only used for Google Workspace accounts.","type":"boolean","default":"false"},"neverMarkSpam":{"location":"query","description":"Ignore the Gmail spam classifier decision and never mark this email as SPAM in the mailbox.","type":"boolean","default":"false"},"userId":{"default":"me","type":"string","required":true,"description":"The user's email address. The special value `me` can be used to indicate the authenticated user.","location":"path"},"processForCalendar":{"default":"false","description":"Process calendar invites in the email and add any extracted meetings to the Google Calendar for this user.","type":"boolean","location":"query"}},"request":{"$ref":"Message"},"id":"gmail.users.messages.import","mediaUpload":{"accept":["message/*"],"protocols":{"resumable":{"multipart":true,"path":"/resumable/upload/gmail/v1/users/{userId}/messages/import"},"simple":{"path":"/upload/gmail/v1/users/{userId}/messages/import","multipart":true}},"maxSize":"157286400"},"description":"Imports a message into only this user's mailbox, with standard email delivery scanning and classification similar to receiving via SMTP. This method doesn't perform SPF checks, so it might not work for some spam messages, such as those attempting to perform domain spoofing. This method does not send a message. Note that the maximum size of the message is 150 MB."},"get":{"path":"gmail/v1/users/{userId}/messages/{id}","httpMethod":"GET","parameterOrder":["userId","id"],"scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.addons.current.message.action","https://www.googleapis.com/auth/gmail.addons.current.message.metadata","https://www.googleapis.com/auth/gmail.addons.current.message.readonly","https://www.googleapis.com/auth/gmail.metadata","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly"],"id":"gmail.users.messages.get","description":"Gets the specified message.","flatPath":"gmail/v1/users/{userId}/messages/{id}","response":{"$ref":"Message"},"parameters":{"format":{"location":"query","description":"The format to return the message in.","type":"string","default":"full","enumDescriptions":["Returns only email message ID and labels; does not return the email headers, body, or payload.","Returns the full email message data with body content parsed in the `payload` field; the `raw` field is not used. Format cannot be used when accessing the api using the gmail.metadata scope.","Returns the full email message data with body content in the `raw` field as a base64url encoded string; the `payload` field is not used. Format cannot be used when accessing the api using the gmail.metadata scope.","Returns only email message ID, labels, and email headers."],"enum":["minimal","full","raw","metadata"]},"metadataHeaders":{"location":"query","description":"When given and format is `METADATA`, only include headers specified.","type":"string","repeated":true},"userId":{"description":"The user's email address. The special value `me` can be used to indicate the authenticated user.","location":"path","default":"me","type":"string","required":true},"id":{"location":"path","required":true,"description":"The ID of the message to retrieve. This ID is usually retrieved using `messages.list`. The ID is also contained in the result when a message is inserted (`messages.insert`) or imported (`messages.import`).","type":"string"}}},"delete":{"id":"gmail.users.messages.delete","path":"gmail/v1/users/{userId}/messages/{id}","httpMethod":"DELETE","description":"Immediately and permanently deletes the specified message. This operation cannot be undone. Prefer `messages.trash` instead.","parameterOrder":["userId","id"],"flatPath":"gmail/v1/users/{userId}/messages/{id}","parameters":{"userId":{"description":"The user's email address. The special value `me` can be used to indicate the authenticated user.","location":"path","type":"string","default":"me","required":true},"id":{"description":"The ID of the message to delete.","type":"string","location":"path","required":true}},"scopes":["https://mail.google.com/"]},"untrash":{"flatPath":"gmail/v1/users/{userId}/messages/{id}/untrash","response":{"$ref":"Message"},"parameters":{"userId":{"location":"path","description":"The user's email address. The special value `me` can be used to indicate the authenticated user.","required":true,"default":"me","type":"string"},"id":{"location":"path","required":true,"description":"The ID of the message to remove from Trash.","type":"string"}},"id":"gmail.users.messages.untrash","description":"Removes the specified message from the trash.","scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify"],"path":"gmail/v1/users/{userId}/messages/{id}/untrash","httpMethod":"POST","parameterOrder":["userId","id"]},"insert":{"request":{"$ref":"Message"},"parameters":{"userId":{"default":"me","type":"string","required":true,"description":"The user's email address. The special value `me` can be used to indicate the authenticated user.","location":"path"},"internalDateSource":{"description":"Source for Gmail's internal date of the message.","location":"query","default":"receivedTime","enumDescriptions":["Internal message date set to current time when received by Gmail.","Internal message time based on 'Date' header in email, when valid."],"enum":["receivedTime","dateHeader"],"type":"string"},"deleted":{"default":"false","description":"Mark the email as permanently deleted (not TRASH) and only visible in Google Vault to a Vault administrator. Only used for Google Workspace accounts.","type":"boolean","location":"query"}},"flatPath":"gmail/v1/users/{userId}/messages","response":{"$ref":"Message"},"mediaUpload":{"accept":["message/*"],"maxSize":"157286400","protocols":{"resumable":{"path":"/resumable/upload/gmail/v1/users/{userId}/messages","multipart":true},"simple":{"path":"/upload/gmail/v1/users/{userId}/messages","multipart":true}}},"description":"Directly inserts a message into only this user's mailbox similar to `IMAP APPEND`, bypassing most scanning and classification. Does not send a message. For more information, see [Create and send email messages](https://developers.google.com/workspace/gmail/api/guides/sending).","id":"gmail.users.messages.insert","scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.insert","https://www.googleapis.com/auth/gmail.modify"],"supportsMediaUpload":true,"parameterOrder":["userId"],"httpMethod":"POST","path":"gmail/v1/users/{userId}/messages"},"list":{"scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.metadata","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly"],"parameterOrder":["userId"],"httpMethod":"GET","path":"gmail/v1/users/{userId}/messages","parameters":{"userId":{"required":true,"default":"me","type":"string","location":"path","description":"The user's email address. The special value `me` can be used to indicate the authenticated user."},"q":{"description":"Only return messages matching the specified query. Supports the same query format as the Gmail search box. For example, `\"from:someuser@example.com rfc822msgid: is:unread\"`. Parameter cannot be used when accessing the api using the gmail.metadata scope.","type":"string","location":"query"},"includeSpamTrash":{"location":"query","default":"false","description":"Include messages from `SPAM` and `TRASH` in the results.","type":"boolean"},"maxResults":{"description":"Maximum number of messages to return. This field defaults to 100. The maximum allowed value for this field is 500.","location":"query","default":"100","type":"integer","format":"uint32"},"pageToken":{"location":"query","description":"Page token to retrieve a specific page of results in the list.","type":"string"},"labelIds":{"repeated":true,"description":"Only return messages with labels that match all of the specified label IDs. Messages in a thread might have labels that other messages in the same thread don't have. To learn more, see [Manage labels on messages and threads](https://developers.google.com/workspace/gmail/api/guides/labels#manage_labels_on_messages_threads).","type":"string","location":"query"}},"flatPath":"gmail/v1/users/{userId}/messages","response":{"$ref":"ListMessagesResponse"},"description":"Lists the messages in the user's mailbox. For more information, see [List Gmail messages](https://developers.google.com/workspace/gmail/api/guides/list-messages).","id":"gmail.users.messages.list"}},"resources":{"attachments":{"methods":{"get":{"parameters":{"messageId":{"description":"The ID of the message containing the attachment.","type":"string","location":"path","required":true},"userId":{"description":"The user's email address. The special value `me` can be used to indicate the authenticated user.","location":"path","default":"me","type":"string","required":true},"id":{"description":"The ID of the attachment.","type":"string","location":"path","required":true}},"flatPath":"gmail/v1/users/{userId}/messages/{messageId}/attachments/{id}","response":{"$ref":"MessagePartBody"},"description":"Gets the specified message attachment.","id":"gmail.users.messages.attachments.get","scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.addons.current.message.action","https://www.googleapis.com/auth/gmail.addons.current.message.readonly","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly"],"parameterOrder":["userId","messageId","id"],"httpMethod":"GET","path":"gmail/v1/users/{userId}/messages/{messageId}/attachments/{id}"}}}}},"history":{"methods":{"list":{"id":"gmail.users.history.list","description":"Lists the history of all changes to the given mailbox. History results are returned in chronological order (increasing `historyId`). For more information, see [Synchronize clients with Gmail](https://developers.google.com/workspace/gmail/api/guides/sync).","flatPath":"gmail/v1/users/{userId}/history","response":{"$ref":"ListHistoryResponse"},"parameters":{"maxResults":{"description":"Maximum number of history records to return. This field defaults to 100. The maximum allowed value for this field is 500.","location":"query","default":"100","type":"integer","format":"uint32"},"pageToken":{"location":"query","description":"Page token to retrieve a specific page of results in the list.","type":"string"},"labelId":{"location":"query","description":"Only return messages with a label matching the ID.","type":"string"},"startHistoryId":{"description":"Required. Returns history records after the specified `startHistoryId`. The supplied `startHistoryId` should be obtained from the `historyId` of a message, thread, or previous `list` response. History IDs increase chronologically but are not contiguous with random gaps in between valid IDs. Supplying an invalid or out of date `startHistoryId` typically returns an `HTTP 404` error code. A `historyId` is typically valid for at least a week, but in some rare circumstances may be valid for only a few hours. If you receive an `HTTP 404` error response, your application should perform a full sync. If you receive no `nextPageToken` in the response, there are no updates to retrieve and you can store the returned `historyId` for a future request.","type":"string","format":"uint64","location":"query"},"userId":{"required":true,"type":"string","default":"me","location":"path","description":"The user's email address. The special value `me` can be used to indicate the authenticated user."},"historyTypes":{"location":"query","repeated":true,"description":"History types to be returned by the function","enumDescriptions":["","","",""],"enum":["messageAdded","messageDeleted","labelAdded","labelRemoved"],"type":"string"}},"path":"gmail/v1/users/{userId}/history","httpMethod":"GET","parameterOrder":["userId"],"scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.metadata","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly"]}}},"settings":{"methods":{"getPop":{"id":"gmail.users.settings.getPop","description":"Gets POP settings. For more information, see [Configure POP and IMAP settings with the Gmail API](https://developers.google.com/workspace/gmail/api/guides/pop_imap_settings).","flatPath":"gmail/v1/users/{userId}/settings/pop","response":{"$ref":"PopSettings"},"parameters":{"userId":{"default":"me","type":"string","required":true,"description":"User's email address. The special value \"me\" can be used to indicate the authenticated user.","location":"path"}},"path":"gmail/v1/users/{userId}/settings/pop","httpMethod":"GET","parameterOrder":["userId"],"scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly","https://www.googleapis.com/auth/gmail.settings.basic"]},"updateVacation":{"flatPath":"gmail/v1/users/{userId}/settings/vacation","response":{"$ref":"VacationSettings"},"parameters":{"userId":{"location":"path","description":"User's email address. The special value \"me\" can be used to indicate the authenticated user.","required":true,"type":"string","default":"me"}},"request":{"$ref":"VacationSettings"},"id":"gmail.users.settings.updateVacation","description":"Updates vacation responder settings. For more information, see [Manage vacation settings with the Gmail API](https://developers.google.com/workspace/gmail/api/guides/vacation_settings).","scopes":["https://www.googleapis.com/auth/gmail.settings.basic"],"path":"gmail/v1/users/{userId}/settings/vacation","httpMethod":"PUT","parameterOrder":["userId"]},"getVacation":{"path":"gmail/v1/users/{userId}/settings/vacation","parameterOrder":["userId"],"httpMethod":"GET","scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly","https://www.googleapis.com/auth/gmail.settings.basic"],"id":"gmail.users.settings.getVacation","description":"Gets vacation responder settings. For more information, see [Manage vacation settings with the Gmail API](https://developers.google.com/workspace/gmail/api/guides/vacation_settings).","parameters":{"userId":{"location":"path","description":"User's email address. The special value \"me\" can be used to indicate the authenticated user.","required":true,"default":"me","type":"string"}},"flatPath":"gmail/v1/users/{userId}/settings/vacation","response":{"$ref":"VacationSettings"}},"updateAutoForwarding":{"httpMethod":"PUT","parameterOrder":["userId"],"path":"gmail/v1/users/{userId}/settings/autoForwarding","scopes":["https://www.googleapis.com/auth/gmail.settings.sharing"],"description":"Updates the auto-forwarding setting for the specified account. A verified forwarding address must be specified when auto-forwarding is enabled. For more information, see [Manage email forwarding](https://developers.google.com/workspace/gmail/api/guides/forwarding_settings). This method is only available to service account clients that have been delegated domain-wide authority.","id":"gmail.users.settings.updateAutoForwarding","request":{"$ref":"AutoForwarding"},"flatPath":"gmail/v1/users/{userId}/settings/autoForwarding","response":{"$ref":"AutoForwarding"},"parameters":{"userId":{"location":"path","description":"User's email address. The special value \"me\" can be used to indicate the authenticated user.","required":true,"default":"me","type":"string"}}},"updatePop":{"description":"Updates POP settings. For more information, see [Configure POP and IMAP settings with the Gmail API](https://developers.google.com/workspace/gmail/api/guides/pop_imap_settings).","id":"gmail.users.settings.updatePop","request":{"$ref":"PopSettings"},"flatPath":"gmail/v1/users/{userId}/settings/pop","response":{"$ref":"PopSettings"},"parameters":{"userId":{"description":"User's email address. The special value \"me\" can be used to indicate the authenticated user.","location":"path","default":"me","type":"string","required":true}},"httpMethod":"PUT","parameterOrder":["userId"],"path":"gmail/v1/users/{userId}/settings/pop","scopes":["https://www.googleapis.com/auth/gmail.settings.basic"]},"getLanguage":{"scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly","https://www.googleapis.com/auth/gmail.settings.basic"],"parameterOrder":["userId"],"httpMethod":"GET","path":"gmail/v1/users/{userId}/settings/language","parameters":{"userId":{"location":"path","description":"User's email address. The special value \"me\" can be used to indicate the authenticated user.","required":true,"default":"me","type":"string"}},"flatPath":"gmail/v1/users/{userId}/settings/language","response":{"$ref":"LanguageSettings"},"description":"Gets language settings. For more information, see [Manage language settings](https://developers.google.com/workspace/gmail/api/guides/language-settings).","id":"gmail.users.settings.getLanguage"},"getImap":{"id":"gmail.users.settings.getImap","description":"Gets IMAP settings. For more information, see [Configure POP and IMAP settings with the Gmail API](https://developers.google.com/workspace/gmail/api/guides/pop_imap_settings).","flatPath":"gmail/v1/users/{userId}/settings/imap","response":{"$ref":"ImapSettings"},"parameters":{"userId":{"required":true,"type":"string","default":"me","location":"path","description":"User's email address. The special value \"me\" can be used to indicate the authenticated user."}},"path":"gmail/v1/users/{userId}/settings/imap","httpMethod":"GET","parameterOrder":["userId"],"scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly","https://www.googleapis.com/auth/gmail.settings.basic"]},"updateLanguage":{"httpMethod":"PUT","parameterOrder":["userId"],"path":"gmail/v1/users/{userId}/settings/language","scopes":["https://www.googleapis.com/auth/gmail.settings.basic"],"description":"Updates language settings. For more information, see [Manage language settings](https://developers.google.com/workspace/gmail/api/guides/language-settings). If successful, the return object contains the `displayLanguage` that was saved for the user, which may differ from the value passed into the request. This is because the requested `displayLanguage` may not be directly supported by Gmail but have a close variant that is, and so the variant may be chosen and saved instead.","id":"gmail.users.settings.updateLanguage","request":{"$ref":"LanguageSettings"},"flatPath":"gmail/v1/users/{userId}/settings/language","response":{"$ref":"LanguageSettings"},"parameters":{"userId":{"location":"path","description":"User's email address. The special value \"me\" can be used to indicate the authenticated user.","required":true,"default":"me","type":"string"}}},"getAutoForwarding":{"description":"Gets the auto-forwarding setting for the specified account. For more information, see [Manage email forwarding](https://developers.google.com/workspace/gmail/api/guides/forwarding_settings).","id":"gmail.users.settings.getAutoForwarding","parameters":{"userId":{"type":"string","default":"me","required":true,"description":"User's email address. The special value \"me\" can be used to indicate the authenticated user.","location":"path"}},"flatPath":"gmail/v1/users/{userId}/settings/autoForwarding","response":{"$ref":"AutoForwarding"},"parameterOrder":["userId"],"httpMethod":"GET","path":"gmail/v1/users/{userId}/settings/autoForwarding","scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly","https://www.googleapis.com/auth/gmail.settings.basic"]},"updateImap":{"request":{"$ref":"ImapSettings"},"parameters":{"userId":{"type":"string","default":"me","required":true,"description":"User's email address. The special value \"me\" can be used to indicate the authenticated user.","location":"path"}},"flatPath":"gmail/v1/users/{userId}/settings/imap","response":{"$ref":"ImapSettings"},"description":"Updates IMAP settings. For more information, see [Configure POP and IMAP settings with the Gmail API](https://developers.google.com/workspace/gmail/api/guides/pop_imap_settings).","id":"gmail.users.settings.updateImap","scopes":["https://www.googleapis.com/auth/gmail.settings.basic"],"parameterOrder":["userId"],"httpMethod":"PUT","path":"gmail/v1/users/{userId}/settings/imap"}},"resources":{"filters":{"methods":{"list":{"httpMethod":"GET","parameterOrder":["userId"],"path":"gmail/v1/users/{userId}/settings/filters","scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly","https://www.googleapis.com/auth/gmail.settings.basic"],"description":"Lists the message filters of a Gmail user. For more information, see [Manage Gmail filters](https://developers.google.com/workspace/gmail/api/guides/filter_settings).","id":"gmail.users.settings.filters.list","flatPath":"gmail/v1/users/{userId}/settings/filters","response":{"$ref":"ListFiltersResponse"},"parameters":{"userId":{"default":"me","type":"string","required":true,"description":"User's email address. The special value \"me\" can be used to indicate the authenticated user.","location":"path"}}},"delete":{"id":"gmail.users.settings.filters.delete","path":"gmail/v1/users/{userId}/settings/filters/{id}","parameterOrder":["userId","id"],"httpMethod":"DELETE","description":"Immediately and permanently deletes the specified filter. For more information, see [Manage Gmail filters](https://developers.google.com/workspace/gmail/api/guides/filter_settings).","parameters":{"userId":{"type":"string","default":"me","required":true,"description":"User's email address. The special value \"me\" can be used to indicate the authenticated user.","location":"path"},"id":{"description":"The ID of the filter to be deleted.","type":"string","location":"path","required":true}},"flatPath":"gmail/v1/users/{userId}/settings/filters/{id}","scopes":["https://www.googleapis.com/auth/gmail.settings.basic"]},"get":{"path":"gmail/v1/users/{userId}/settings/filters/{id}","parameterOrder":["userId","id"],"httpMethod":"GET","scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly","https://www.googleapis.com/auth/gmail.settings.basic"],"id":"gmail.users.settings.filters.get","description":"Gets a filter. For more information, see [Manage Gmail filters](https://developers.google.com/workspace/gmail/api/guides/filter_settings).","parameters":{"userId":{"description":"User's email address. The special value \"me\" can be used to indicate the authenticated user.","location":"path","default":"me","type":"string","required":true},"id":{"location":"path","required":true,"description":"The ID of the filter to be fetched.","type":"string"}},"flatPath":"gmail/v1/users/{userId}/settings/filters/{id}","response":{"$ref":"Filter"}},"create":{"request":{"$ref":"Filter"},"flatPath":"gmail/v1/users/{userId}/settings/filters","response":{"$ref":"Filter"},"parameters":{"userId":{"default":"me","type":"string","required":true,"description":"User's email address. The special value \"me\" can be used to indicate the authenticated user.","location":"path"}},"description":"Creates a filter. Note: you can only create a maximum of 1,000 filters. For more information, see [Manage Gmail filters](https://developers.google.com/workspace/gmail/api/guides/filter_settings).","id":"gmail.users.settings.filters.create","scopes":["https://www.googleapis.com/auth/gmail.settings.basic"],"httpMethod":"POST","parameterOrder":["userId"],"path":"gmail/v1/users/{userId}/settings/filters"}}},"forwardingAddresses":{"methods":{"delete":{"scopes":["https://www.googleapis.com/auth/gmail.settings.sharing"],"parameters":{"userId":{"location":"path","description":"User's email address. The special value \"me\" can be used to indicate the authenticated user.","required":true,"type":"string","default":"me"},"forwardingEmail":{"location":"path","required":true,"description":"The forwarding address to be deleted.","type":"string"}},"flatPath":"gmail/v1/users/{userId}/settings/forwardingAddresses/{forwardingEmail}","parameterOrder":["userId","forwardingEmail"],"httpMethod":"DELETE","description":"Deletes the specified forwarding address and revokes any verification that may have been required. For more information, see [Manage email forwarding](https://developers.google.com/workspace/gmail/api/guides/forwarding_settings). This method is only available to service account clients that have been delegated domain-wide authority.","id":"gmail.users.settings.forwardingAddresses.delete","path":"gmail/v1/users/{userId}/settings/forwardingAddresses/{forwardingEmail}"},"get":{"scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly","https://www.googleapis.com/auth/gmail.settings.basic"],"path":"gmail/v1/users/{userId}/settings/forwardingAddresses/{forwardingEmail}","httpMethod":"GET","parameterOrder":["userId","forwardingEmail"],"flatPath":"gmail/v1/users/{userId}/settings/forwardingAddresses/{forwardingEmail}","response":{"$ref":"ForwardingAddress"},"parameters":{"userId":{"location":"path","description":"User's email address. The special value \"me\" can be used to indicate the authenticated user.","required":true,"default":"me","type":"string"},"forwardingEmail":{"location":"path","required":true,"description":"The forwarding address to be retrieved.","type":"string"}},"id":"gmail.users.settings.forwardingAddresses.get","description":"Gets the specified forwarding address. For more information, see [Manage email forwarding](https://developers.google.com/workspace/gmail/api/guides/forwarding_settings)."},"create":{"scopes":["https://www.googleapis.com/auth/gmail.settings.sharing"],"path":"gmail/v1/users/{userId}/settings/forwardingAddresses","parameterOrder":["userId"],"httpMethod":"POST","parameters":{"userId":{"description":"User's email address. The special value \"me\" can be used to indicate the authenticated user.","location":"path","default":"me","type":"string","required":true}},"flatPath":"gmail/v1/users/{userId}/settings/forwardingAddresses","response":{"$ref":"ForwardingAddress"},"request":{"$ref":"ForwardingAddress"},"id":"gmail.users.settings.forwardingAddresses.create","description":"Creates a forwarding address. If ownership verification is required, a message will be sent to the recipient and the resource's verification status will be set to `pending`; otherwise, the resource will be created with verification status set to `accepted`. For more information, see [Manage email forwarding](https://developers.google.com/workspace/gmail/api/guides/forwarding_settings). This method is only available to service account clients that have been delegated domain-wide authority."},"list":{"scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly","https://www.googleapis.com/auth/gmail.settings.basic"],"path":"gmail/v1/users/{userId}/settings/forwardingAddresses","parameterOrder":["userId"],"httpMethod":"GET","parameters":{"userId":{"location":"path","description":"User's email address. The special value \"me\" can be used to indicate the authenticated user.","required":true,"default":"me","type":"string"}},"flatPath":"gmail/v1/users/{userId}/settings/forwardingAddresses","response":{"$ref":"ListForwardingAddressesResponse"},"id":"gmail.users.settings.forwardingAddresses.list","description":"Lists the forwarding addresses for the specified account. For more information, see [Manage email forwarding](https://developers.google.com/workspace/gmail/api/guides/forwarding_settings)."}}},"delegates":{"methods":{"get":{"scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly","https://www.googleapis.com/auth/gmail.settings.basic"],"path":"gmail/v1/users/{userId}/settings/delegates/{delegateEmail}","parameterOrder":["userId","delegateEmail"],"httpMethod":"GET","parameters":{"userId":{"required":true,"default":"me","type":"string","location":"path","description":"User's email address. The special value \"me\" can be used to indicate the authenticated user."},"delegateEmail":{"description":"The email address of the user whose delegate relationship is to be retrieved.","type":"string","location":"path","required":true}},"flatPath":"gmail/v1/users/{userId}/settings/delegates/{delegateEmail}","response":{"$ref":"Delegate"},"id":"gmail.users.settings.delegates.get","description":"Gets the specified delegate. For more information, see [Manage delegates](https://developers.google.com/workspace/gmail/api/guides/delegate_settings). A delegate user must be referred to by their primary email address, and not an email alias. This method is only available to service account clients that have been delegated domain-wide authority."},"create":{"description":"Adds a delegate with its verification status set directly to `accepted`, without sending any verification email. The delegate user must be a member of the same Google Workspace organization as the delegator user. For more information, see [Manage delegates](https://developers.google.com/workspace/gmail/api/guides/delegate_settings). Gmail imposes limitations on the number of delegates and delegators each user in a Google Workspace organization can have. These limits depend on your organization, but in general each user can have up to 25 delegates and up to 10 delegators. A delegate user must be referred to by their primary email address, and not an email alias. When a new delegate is created, there may be up to a one minute delay before the new delegate is available for use. This method is only available to service account clients that have been delegated domain-wide authority.","id":"gmail.users.settings.delegates.create","request":{"$ref":"Delegate"},"parameters":{"userId":{"required":true,"type":"string","default":"me","location":"path","description":"User's email address. The special value \"me\" can be used to indicate the authenticated user."}},"flatPath":"gmail/v1/users/{userId}/settings/delegates","response":{"$ref":"Delegate"},"parameterOrder":["userId"],"httpMethod":"POST","path":"gmail/v1/users/{userId}/settings/delegates","scopes":["https://www.googleapis.com/auth/gmail.settings.sharing"]},"delete":{"httpMethod":"DELETE","description":"Removes the specified delegate (which can be of any verification status), and revokes any verification that may have been required for using it. For more information, see [Manage delegates](https://developers.google.com/workspace/gmail/api/guides/delegate_settings). A delegate user must be referred to by their primary email address, and not an email alias. This method is only available to service account clients that have been delegated domain-wide authority.","parameterOrder":["userId","delegateEmail"],"id":"gmail.users.settings.delegates.delete","path":"gmail/v1/users/{userId}/settings/delegates/{delegateEmail}","scopes":["https://www.googleapis.com/auth/gmail.settings.sharing"],"flatPath":"gmail/v1/users/{userId}/settings/delegates/{delegateEmail}","parameters":{"userId":{"location":"path","description":"User's email address. The special value \"me\" can be used to indicate the authenticated user.","required":true,"default":"me","type":"string"},"delegateEmail":{"location":"path","required":true,"description":"The email address of the user to be removed as a delegate.","type":"string"}}},"list":{"path":"gmail/v1/users/{userId}/settings/delegates","httpMethod":"GET","parameterOrder":["userId"],"scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly","https://www.googleapis.com/auth/gmail.settings.basic"],"id":"gmail.users.settings.delegates.list","description":"Lists the delegates for the specified account. For more information, see [Manage delegates](https://developers.google.com/workspace/gmail/api/guides/delegate_settings). This method is only available to service account clients that have been delegated domain-wide authority.","flatPath":"gmail/v1/users/{userId}/settings/delegates","response":{"$ref":"ListDelegatesResponse"},"parameters":{"userId":{"description":"User's email address. The special value \"me\" can be used to indicate the authenticated user.","location":"path","type":"string","default":"me","required":true}}}}},"cse":{"resources":{"keypairs":{"methods":{"create":{"path":"gmail/v1/users/{userId}/settings/cse/keypairs","parameterOrder":["userId"],"httpMethod":"POST","scopes":["https://www.googleapis.com/auth/gmail.settings.basic","https://www.googleapis.com/auth/gmail.settings.sharing"],"id":"gmail.users.settings.cse.keypairs.create","description":"Creates and uploads a client-side encryption S/MIME public key certificate chain and private key metadata for the authenticated user. For administrators managing identities and keypairs for users in their organization, requests require authorization with a [service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation authority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with the `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users managing their own identities and keypairs, requests require [hardware key encryption](https://support.google.com/a/answer/14153163) turned on and configured.","parameters":{"userId":{"type":"string","default":"me","required":true,"description":"The requester's primary email address. To indicate the authenticated user, you can use the special value `me`.","location":"path"}},"flatPath":"gmail/v1/users/{userId}/settings/cse/keypairs","response":{"$ref":"CseKeyPair"},"request":{"$ref":"CseKeyPair"}},"get":{"scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly","https://www.googleapis.com/auth/gmail.settings.basic","https://www.googleapis.com/auth/gmail.settings.sharing"],"path":"gmail/v1/users/{userId}/settings/cse/keypairs/{keyPairId}","parameterOrder":["userId","keyPairId"],"httpMethod":"GET","parameters":{"keyPairId":{"location":"path","required":true,"description":"The identifier of the key pair to retrieve.","type":"string"},"userId":{"description":"The requester's primary email address. To indicate the authenticated user, you can use the special value `me`.","location":"path","type":"string","default":"me","required":true}},"flatPath":"gmail/v1/users/{userId}/settings/cse/keypairs/{keyPairId}","response":{"$ref":"CseKeyPair"},"id":"gmail.users.settings.cse.keypairs.get","description":"Retrieves an existing client-side encryption key pair. For administrators managing identities and keypairs for users in their organization, requests require authorization with a [service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation authority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with the `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users managing their own identities and keypairs, requests require [hardware key encryption](https://support.google.com/a/answer/14153163) turned on and configured."},"disable":{"path":"gmail/v1/users/{userId}/settings/cse/keypairs/{keyPairId}:disable","httpMethod":"POST","parameterOrder":["userId","keyPairId"],"scopes":["https://www.googleapis.com/auth/gmail.settings.basic","https://www.googleapis.com/auth/gmail.settings.sharing"],"id":"gmail.users.settings.cse.keypairs.disable","description":"Turns off a client-side encryption key pair. The authenticated user can no longer use the key pair to decrypt incoming CSE message texts or sign outgoing CSE mail. To regain access, use the EnableCseKeyPair to turn on the key pair. After 30 days, you can permanently delete the key pair by using the ObliterateCseKeyPair method. For administrators managing identities and keypairs for users in their organization, requests require authorization with a [service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation authority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with the `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users managing their own identities and keypairs, requests require [hardware key encryption](https://support.google.com/a/answer/14153163) turned on and configured.","flatPath":"gmail/v1/users/{userId}/settings/cse/keypairs/{keyPairId}:disable","response":{"$ref":"CseKeyPair"},"parameters":{"keyPairId":{"description":"The identifier of the key pair to turn off.","type":"string","location":"path","required":true},"userId":{"required":true,"default":"me","type":"string","location":"path","description":"The requester's primary email address. To indicate the authenticated user, you can use the special value `me`."}},"request":{"$ref":"DisableCseKeyPairRequest"}},"enable":{"httpMethod":"POST","parameterOrder":["userId","keyPairId"],"path":"gmail/v1/users/{userId}/settings/cse/keypairs/{keyPairId}:enable","scopes":["https://www.googleapis.com/auth/gmail.settings.basic","https://www.googleapis.com/auth/gmail.settings.sharing"],"description":"Turns on a client-side encryption key pair that was turned off. The key pair becomes active again for any associated client-side encryption identities. For administrators managing identities and keypairs for users in their organization, requests require authorization with a [service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation authority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with the `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users managing their own identities and keypairs, requests require [hardware key encryption](https://support.google.com/a/answer/14153163) turned on and configured.","id":"gmail.users.settings.cse.keypairs.enable","request":{"$ref":"EnableCseKeyPairRequest"},"flatPath":"gmail/v1/users/{userId}/settings/cse/keypairs/{keyPairId}:enable","response":{"$ref":"CseKeyPair"},"parameters":{"userId":{"location":"path","description":"The requester's primary email address. To indicate the authenticated user, you can use the special value `me`.","required":true,"type":"string","default":"me"},"keyPairId":{"location":"path","required":true,"description":"The identifier of the key pair to turn on.","type":"string"}}},"obliterate":{"scopes":["https://www.googleapis.com/auth/gmail.settings.basic","https://www.googleapis.com/auth/gmail.settings.sharing"],"path":"gmail/v1/users/{userId}/settings/cse/keypairs/{keyPairId}:obliterate","httpMethod":"POST","parameterOrder":["userId","keyPairId"],"flatPath":"gmail/v1/users/{userId}/settings/cse/keypairs/{keyPairId}:obliterate","parameters":{"keyPairId":{"location":"path","required":true,"description":"The identifier of the key pair to obliterate.","type":"string"},"userId":{"description":"The requester's primary email address. To indicate the authenticated user, you can use the special value `me`.","location":"path","type":"string","default":"me","required":true}},"request":{"$ref":"ObliterateCseKeyPairRequest"},"id":"gmail.users.settings.cse.keypairs.obliterate","description":"Deletes a client-side encryption key pair permanently and immediately. You can only permanently delete key pairs that have been turned off for more than 30 days. To turn off a key pair, use the DisableCseKeyPair method. Gmail can't restore or decrypt any messages that were encrypted by an obliterated key. Authenticated users and Google Workspace administrators lose access to reading the encrypted messages. For administrators managing identities and keypairs for users in their organization, requests require authorization with a [service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation authority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with the `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users managing their own identities and keypairs, requests require [hardware key encryption](https://support.google.com/a/answer/14153163) turned on and configured."},"list":{"id":"gmail.users.settings.cse.keypairs.list","description":"Lists client-side encryption key pairs for an authenticated user. For administrators managing identities and keypairs for users in their organization, requests require authorization with a [service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation authority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with the `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users managing their own identities and keypairs, requests require [hardware key encryption](https://support.google.com/a/answer/14153163) turned on and configured.","flatPath":"gmail/v1/users/{userId}/settings/cse/keypairs","response":{"$ref":"ListCseKeyPairsResponse"},"parameters":{"pageToken":{"location":"query","description":"Pagination token indicating which page of key pairs to return. If the token is not supplied, then the API will return the first page of results.","type":"string"},"pageSize":{"type":"integer","format":"int32","default":"20","description":"The number of key pairs to return. If not provided, the page size will default to 20 entries.","location":"query"},"userId":{"location":"path","description":"The requester's primary email address. To indicate the authenticated user, you can use the special value `me`.","required":true,"type":"string","default":"me"}},"path":"gmail/v1/users/{userId}/settings/cse/keypairs","httpMethod":"GET","parameterOrder":["userId"],"scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly","https://www.googleapis.com/auth/gmail.settings.basic","https://www.googleapis.com/auth/gmail.settings.sharing"]}}},"identities":{"methods":{"create":{"path":"gmail/v1/users/{userId}/settings/cse/identities","parameterOrder":["userId"],"httpMethod":"POST","scopes":["https://www.googleapis.com/auth/gmail.settings.basic","https://www.googleapis.com/auth/gmail.settings.sharing"],"id":"gmail.users.settings.cse.identities.create","description":"Creates and configures a client-side encryption identity that's authorized to send mail from the user account. Google publishes the S/MIME certificate to a shared domain-wide directory so that people within a Google Workspace organization can encrypt and send mail to the identity. For administrators managing identities and keypairs for users in their organization, requests require authorization with a [service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation authority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with the `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users managing their own identities and keypairs, requests require [hardware key encryption](https://support.google.com/a/answer/14153163) turned on and configured.","parameters":{"userId":{"description":"The requester's primary email address. To indicate the authenticated user, you can use the special value `me`.","location":"path","default":"me","type":"string","required":true}},"flatPath":"gmail/v1/users/{userId}/settings/cse/identities","response":{"$ref":"CseIdentity"},"request":{"$ref":"CseIdentity"}},"get":{"parameterOrder":["userId","cseEmailAddress"],"httpMethod":"GET","path":"gmail/v1/users/{userId}/settings/cse/identities/{cseEmailAddress}","scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly","https://www.googleapis.com/auth/gmail.settings.basic","https://www.googleapis.com/auth/gmail.settings.sharing"],"description":"Retrieves a client-side encryption identity configuration. For administrators managing identities and keypairs for users in their organization, requests require authorization with a [service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation authority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with the `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users managing their own identities and keypairs, requests require [hardware key encryption](https://support.google.com/a/answer/14153163) turned on and configured.","id":"gmail.users.settings.cse.identities.get","parameters":{"userId":{"required":true,"type":"string","default":"me","location":"path","description":"The requester's primary email address. To indicate the authenticated user, you can use the special value `me`."},"cseEmailAddress":{"location":"path","required":true,"description":"The primary email address associated with the client-side encryption identity configuration that's retrieved.","type":"string"}},"flatPath":"gmail/v1/users/{userId}/settings/cse/identities/{cseEmailAddress}","response":{"$ref":"CseIdentity"}},"delete":{"id":"gmail.users.settings.cse.identities.delete","path":"gmail/v1/users/{userId}/settings/cse/identities/{cseEmailAddress}","parameterOrder":["userId","cseEmailAddress"],"httpMethod":"DELETE","description":"Deletes a client-side encryption identity. The authenticated user can no longer use the identity to send encrypted messages. You cannot restore the identity after you delete it. Instead, use the CreateCseIdentity method to create another identity with the same configuration. For administrators managing identities and keypairs for users in their organization, requests require authorization with a [service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation authority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with the `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users managing their own identities and keypairs, requests require [hardware key encryption](https://support.google.com/a/answer/14153163) turned on and configured.","parameters":{"userId":{"location":"path","description":"The requester's primary email address. To indicate the authenticated user, you can use the special value `me`.","required":true,"type":"string","default":"me"},"cseEmailAddress":{"description":"The primary email address associated with the client-side encryption identity configuration that's removed.","type":"string","location":"path","required":true}},"flatPath":"gmail/v1/users/{userId}/settings/cse/identities/{cseEmailAddress}","scopes":["https://www.googleapis.com/auth/gmail.settings.basic","https://www.googleapis.com/auth/gmail.settings.sharing"]},"patch":{"description":"Associates a different key pair with an existing client-side encryption identity. The updated key pair must validate against Google's [S/MIME certificate profiles](https://support.google.com/a/answer/7300887). For administrators managing identities and keypairs for users in their organization, requests require authorization with a [service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation authority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with the `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users managing their own identities and keypairs, requests require [hardware key encryption](https://support.google.com/a/answer/14153163) turned on and configured.","id":"gmail.users.settings.cse.identities.patch","request":{"$ref":"CseIdentity"},"flatPath":"gmail/v1/users/{userId}/settings/cse/identities/{emailAddress}","response":{"$ref":"CseIdentity"},"parameters":{"userId":{"description":"The requester's primary email address. To indicate the authenticated user, you can use the special value `me`.","location":"path","type":"string","default":"me","required":true},"emailAddress":{"description":"The email address of the client-side encryption identity to update.","type":"string","location":"path","required":true}},"httpMethod":"PATCH","parameterOrder":["userId","emailAddress"],"path":"gmail/v1/users/{userId}/settings/cse/identities/{emailAddress}","scopes":["https://www.googleapis.com/auth/gmail.settings.basic","https://www.googleapis.com/auth/gmail.settings.sharing"]},"list":{"parameters":{"userId":{"default":"me","type":"string","required":true,"description":"The requester's primary email address. To indicate the authenticated user, you can use the special value `me`.","location":"path"},"pageToken":{"description":"Pagination token indicating which page of identities to return. If the token is not supplied, then the API will return the first page of results.","type":"string","location":"query"},"pageSize":{"type":"integer","format":"int32","default":"20","location":"query","description":"The number of identities to return. If not provided, the page size will default to 20 entries."}},"flatPath":"gmail/v1/users/{userId}/settings/cse/identities","response":{"$ref":"ListCseIdentitiesResponse"},"description":"Lists the client-side encrypted identities for an authenticated user. For administrators managing identities and keypairs for users in their organization, requests require authorization with a [service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation authority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with the `https://www.googleapis.com/auth/gmail.settings.basic` scope. For users managing their own identities and keypairs, requests require [hardware key encryption](https://support.google.com/a/answer/14153163) turned on and configured.","id":"gmail.users.settings.cse.identities.list","scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly","https://www.googleapis.com/auth/gmail.settings.basic","https://www.googleapis.com/auth/gmail.settings.sharing"],"parameterOrder":["userId"],"httpMethod":"GET","path":"gmail/v1/users/{userId}/settings/cse/identities"}}}}},"sendAs":{"methods":{"update":{"scopes":["https://www.googleapis.com/auth/gmail.settings.basic","https://www.googleapis.com/auth/gmail.settings.sharing"],"path":"gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}","parameterOrder":["userId","sendAsEmail"],"httpMethod":"PUT","parameters":{"userId":{"description":"User's email address. The special value \"me\" can be used to indicate the authenticated user.","location":"path","type":"string","default":"me","required":true},"sendAsEmail":{"description":"The send-as alias to be updated.","type":"string","location":"path","required":true}},"flatPath":"gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}","response":{"$ref":"SendAs"},"request":{"$ref":"SendAs"},"id":"gmail.users.settings.sendAs.update","description":"Updates a send-as alias. If a signature is provided, Gmail will sanitize the HTML before saving it with the alias. For more information, see [Manage aliases and signatures with the Gmail API](https://developers.google.com/workspace/gmail/api/guides/alias_and_signature_settings). Addresses other than the primary address for the account can only be updated by service account clients that have been delegated domain-wide authority."},"verify":{"scopes":["https://www.googleapis.com/auth/gmail.settings.sharing"],"flatPath":"gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/verify","parameters":{"userId":{"location":"path","description":"User's email address. The special value \"me\" can be used to indicate the authenticated user.","required":true,"type":"string","default":"me"},"sendAsEmail":{"description":"The send-as alias to be verified.","type":"string","location":"path","required":true}},"httpMethod":"POST","description":"Sends a verification email to the specified send-as alias address. The verification status must be `pending`. For more information, see [Manage aliases and signatures with the Gmail API](https://developers.google.com/workspace/gmail/api/guides/alias_and_signature_settings). This method is only available to service account clients that have been delegated domain-wide authority.","parameterOrder":["userId","sendAsEmail"],"id":"gmail.users.settings.sendAs.verify","path":"gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/verify"},"list":{"flatPath":"gmail/v1/users/{userId}/settings/sendAs","response":{"$ref":"ListSendAsResponse"},"parameters":{"userId":{"description":"User's email address. The special value \"me\" can be used to indicate the authenticated user.","location":"path","default":"me","type":"string","required":true}},"description":"Lists the send-as aliases for the specified account. The result includes the primary send-as address associated with the account as well as any custom \"from\" aliases. For more information, see [Manage aliases and signatures with the Gmail API](https://developers.google.com/workspace/gmail/api/guides/alias_and_signature_settings).","id":"gmail.users.settings.sendAs.list","scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly","https://www.googleapis.com/auth/gmail.settings.basic"],"httpMethod":"GET","parameterOrder":["userId"],"path":"gmail/v1/users/{userId}/settings/sendAs"},"patch":{"parameters":{"userId":{"default":"me","type":"string","required":true,"description":"User's email address. The special value \"me\" can be used to indicate the authenticated user.","location":"path"},"sendAsEmail":{"location":"path","required":true,"description":"The send-as alias to be updated.","type":"string"}},"flatPath":"gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}","response":{"$ref":"SendAs"},"request":{"$ref":"SendAs"},"id":"gmail.users.settings.sendAs.patch","description":"Patch the specified send-as alias. For more information, see [Manage aliases and signatures with the Gmail API](https://developers.google.com/workspace/gmail/api/guides/alias_and_signature_settings).","scopes":["https://www.googleapis.com/auth/gmail.settings.basic","https://www.googleapis.com/auth/gmail.settings.sharing"],"path":"gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}","parameterOrder":["userId","sendAsEmail"],"httpMethod":"PATCH"},"delete":{"scopes":["https://www.googleapis.com/auth/gmail.settings.sharing"],"parameters":{"userId":{"description":"User's email address. The special value \"me\" can be used to indicate the authenticated user.","location":"path","type":"string","default":"me","required":true},"sendAsEmail":{"location":"path","required":true,"description":"The send-as alias to be deleted.","type":"string"}},"flatPath":"gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}","parameterOrder":["userId","sendAsEmail"],"httpMethod":"DELETE","description":"Deletes the specified send-as alias. Revokes any verification that may have been required for using it. For more information, see [Manage aliases and signatures with the Gmail API](https://developers.google.com/workspace/gmail/api/guides/alias_and_signature_settings). This method is only available to service account clients that have been delegated domain-wide authority.","id":"gmail.users.settings.sendAs.delete","path":"gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}"},"get":{"flatPath":"gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}","response":{"$ref":"SendAs"},"parameters":{"userId":{"description":"User's email address. The special value \"me\" can be used to indicate the authenticated user.","location":"path","default":"me","type":"string","required":true},"sendAsEmail":{"location":"path","required":true,"description":"The send-as alias to be retrieved.","type":"string"}},"description":"Gets the specified send-as alias. Fails with an HTTP 404 error if the specified address is not a member of the collection. For more information, see [Manage aliases and signatures with the Gmail API](https://developers.google.com/workspace/gmail/api/guides/alias_and_signature_settings).","id":"gmail.users.settings.sendAs.get","scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly","https://www.googleapis.com/auth/gmail.settings.basic"],"httpMethod":"GET","parameterOrder":["userId","sendAsEmail"],"path":"gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}"},"create":{"flatPath":"gmail/v1/users/{userId}/settings/sendAs","response":{"$ref":"SendAs"},"parameters":{"userId":{"description":"User's email address. The special value \"me\" can be used to indicate the authenticated user.","location":"path","default":"me","type":"string","required":true}},"request":{"$ref":"SendAs"},"id":"gmail.users.settings.sendAs.create","description":"Creates a custom \"from\" send-as alias. If an SMTP MSA is specified, Gmail will attempt to connect to the SMTP service to validate the configuration before creating the alias. If ownership verification is required for the alias, a message will be sent to the email address and the resource's verification status will be set to `pending`; otherwise, the resource will be created with verification status set to `accepted`. If a signature is provided, Gmail will sanitize the HTML before saving it with the alias. For more information, see [Manage aliases and signatures with the Gmail API](https://developers.google.com/workspace/gmail/api/guides/alias_and_signature_settings). This method is only available to service account clients that have been delegated domain-wide authority.","scopes":["https://www.googleapis.com/auth/gmail.settings.sharing"],"path":"gmail/v1/users/{userId}/settings/sendAs","httpMethod":"POST","parameterOrder":["userId"]}},"resources":{"smimeInfo":{"methods":{"list":{"id":"gmail.users.settings.sendAs.smimeInfo.list","description":"Lists S/MIME configs for the specified send-as alias. For more information, see [Manage S/MIME certificates with the Gmail API](https://developers.google.com/workspace/gmail/api/guides/smime_certs).","parameters":{"userId":{"location":"path","description":"The user's email address. The special value `me` can be used to indicate the authenticated user.","required":true,"default":"me","type":"string"},"sendAsEmail":{"location":"path","required":true,"description":"The email address that appears in the \"From:\" header for mail sent using this alias.","type":"string"}},"flatPath":"gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo","response":{"$ref":"ListSmimeInfoResponse"},"path":"gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo","parameterOrder":["userId","sendAsEmail"],"httpMethod":"GET","scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly","https://www.googleapis.com/auth/gmail.settings.basic","https://www.googleapis.com/auth/gmail.settings.sharing"]},"insert":{"scopes":["https://www.googleapis.com/auth/gmail.settings.basic","https://www.googleapis.com/auth/gmail.settings.sharing"],"path":"gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo","httpMethod":"POST","parameterOrder":["userId","sendAsEmail"],"flatPath":"gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo","response":{"$ref":"SmimeInfo"},"parameters":{"userId":{"description":"The user's email address. The special value `me` can be used to indicate the authenticated user.","location":"path","type":"string","default":"me","required":true},"sendAsEmail":{"location":"path","required":true,"description":"The email address that appears in the \"From:\" header for mail sent using this alias.","type":"string"}},"request":{"$ref":"SmimeInfo"},"id":"gmail.users.settings.sendAs.smimeInfo.insert","description":"Insert (upload) the given S/MIME config for the specified send-as alias. Note that `pkcs12` format is required for the key. For more information, see [Manage S/MIME certificates with the Gmail API](https://developers.google.com/workspace/gmail/api/guides/smime_certs)."},"get":{"path":"gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}","parameterOrder":["userId","sendAsEmail","id"],"httpMethod":"GET","scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly","https://www.googleapis.com/auth/gmail.settings.basic","https://www.googleapis.com/auth/gmail.settings.sharing"],"id":"gmail.users.settings.sendAs.smimeInfo.get","description":"Gets the specified S/MIME config for the specified send-as alias. For more information, see [Manage S/MIME certificates with the Gmail API](https://developers.google.com/workspace/gmail/api/guides/smime_certs).","parameters":{"sendAsEmail":{"description":"The email address that appears in the \"From:\" header for mail sent using this alias.","type":"string","location":"path","required":true},"userId":{"location":"path","description":"The user's email address. The special value `me` can be used to indicate the authenticated user.","required":true,"type":"string","default":"me"},"id":{"location":"path","required":true,"description":"The immutable ID for the SmimeInfo.","type":"string"}},"flatPath":"gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}","response":{"$ref":"SmimeInfo"}},"setDefault":{"parameters":{"userId":{"description":"The user's email address. The special value `me` can be used to indicate the authenticated user.","location":"path","type":"string","default":"me","required":true},"id":{"location":"path","required":true,"description":"The immutable ID for the SmimeInfo.","type":"string"},"sendAsEmail":{"location":"path","required":true,"description":"The email address that appears in the \"From:\" header for mail sent using this alias.","type":"string"}},"flatPath":"gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}/setDefault","scopes":["https://www.googleapis.com/auth/gmail.settings.basic","https://www.googleapis.com/auth/gmail.settings.sharing"],"id":"gmail.users.settings.sendAs.smimeInfo.setDefault","path":"gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}/setDefault","parameterOrder":["userId","sendAsEmail","id"],"httpMethod":"POST","description":"Sets the default S/MIME config for the specified send-as alias. For more information, see [Manage S/MIME certificates with the Gmail API](https://developers.google.com/workspace/gmail/api/guides/smime_certs)."},"delete":{"scopes":["https://www.googleapis.com/auth/gmail.settings.basic","https://www.googleapis.com/auth/gmail.settings.sharing"],"parameters":{"userId":{"required":true,"default":"me","type":"string","location":"path","description":"The user's email address. The special value `me` can be used to indicate the authenticated user."},"id":{"location":"path","required":true,"description":"The immutable ID for the SmimeInfo.","type":"string"},"sendAsEmail":{"description":"The email address that appears in the \"From:\" header for mail sent using this alias.","type":"string","location":"path","required":true}},"flatPath":"gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}","parameterOrder":["userId","sendAsEmail","id"],"httpMethod":"DELETE","description":"Deletes the specified S/MIME config for the specified send-as alias. For more information, see [Manage S/MIME certificates with the Gmail API](https://developers.google.com/workspace/gmail/api/guides/smime_certs).","id":"gmail.users.settings.sendAs.smimeInfo.delete","path":"gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}"}}}}}}},"labels":{"methods":{"list":{"description":"Lists all labels in the user's mailbox. For more information, see [Manage labels](https://developers.google.com/workspace/gmail/api/guides/labels).","id":"gmail.users.labels.list","parameters":{"userId":{"default":"me","type":"string","required":true,"description":"The user's email address. The special value `me` can be used to indicate the authenticated user.","location":"path"}},"flatPath":"gmail/v1/users/{userId}/labels","response":{"$ref":"ListLabelsResponse"},"parameterOrder":["userId"],"httpMethod":"GET","path":"gmail/v1/users/{userId}/labels","scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.labels","https://www.googleapis.com/auth/gmail.metadata","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly"]},"update":{"scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.labels","https://www.googleapis.com/auth/gmail.modify"],"path":"gmail/v1/users/{userId}/labels/{id}","parameterOrder":["userId","id"],"httpMethod":"PUT","parameters":{"userId":{"type":"string","default":"me","required":true,"description":"The user's email address. The special value `me` can be used to indicate the authenticated user.","location":"path"},"id":{"description":"The ID of the label to update.","type":"string","location":"path","required":true}},"flatPath":"gmail/v1/users/{userId}/labels/{id}","response":{"$ref":"Label"},"request":{"$ref":"Label"},"id":"gmail.users.labels.update","description":"Updates the specified label. For more information, see [Manage labels](https://developers.google.com/workspace/gmail/api/guides/labels)."},"delete":{"scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.labels","https://www.googleapis.com/auth/gmail.modify"],"parameters":{"userId":{"location":"path","description":"The user's email address. The special value `me` can be used to indicate the authenticated user.","required":true,"default":"me","type":"string"},"id":{"description":"The ID of the label to delete.","type":"string","location":"path","required":true}},"flatPath":"gmail/v1/users/{userId}/labels/{id}","parameterOrder":["userId","id"],"httpMethod":"DELETE","description":"Immediately and permanently deletes the specified label and removes it from any messages and threads that it's applied to. For more information, see [Manage labels](https://developers.google.com/workspace/gmail/api/guides/labels).","id":"gmail.users.labels.delete","path":"gmail/v1/users/{userId}/labels/{id}"},"patch":{"id":"gmail.users.labels.patch","description":"Patch the specified label. For more information, see [Manage labels](https://developers.google.com/workspace/gmail/api/guides/labels).","parameters":{"userId":{"description":"The user's email address. The special value `me` can be used to indicate the authenticated user.","location":"path","type":"string","default":"me","required":true},"id":{"description":"The ID of the label to update.","type":"string","location":"path","required":true}},"flatPath":"gmail/v1/users/{userId}/labels/{id}","response":{"$ref":"Label"},"request":{"$ref":"Label"},"path":"gmail/v1/users/{userId}/labels/{id}","parameterOrder":["userId","id"],"httpMethod":"PATCH","scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.labels","https://www.googleapis.com/auth/gmail.modify"]},"create":{"path":"gmail/v1/users/{userId}/labels","httpMethod":"POST","parameterOrder":["userId"],"scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.labels","https://www.googleapis.com/auth/gmail.modify"],"id":"gmail.users.labels.create","description":"Creates a label. For more information, see [Manage labels](https://developers.google.com/workspace/gmail/api/guides/labels).","flatPath":"gmail/v1/users/{userId}/labels","response":{"$ref":"Label"},"parameters":{"userId":{"default":"me","type":"string","required":true,"description":"The user's email address. The special value `me` can be used to indicate the authenticated user.","location":"path"}},"request":{"$ref":"Label"}},"get":{"path":"gmail/v1/users/{userId}/labels/{id}","parameterOrder":["userId","id"],"httpMethod":"GET","scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.labels","https://www.googleapis.com/auth/gmail.metadata","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly"],"id":"gmail.users.labels.get","description":"Gets the specified label. For more information, see [Manage labels](https://developers.google.com/workspace/gmail/api/guides/labels).","parameters":{"userId":{"required":true,"type":"string","default":"me","location":"path","description":"The user's email address. The special value `me` can be used to indicate the authenticated user."},"id":{"description":"The ID of the label to retrieve.","type":"string","location":"path","required":true}},"flatPath":"gmail/v1/users/{userId}/labels/{id}","response":{"$ref":"Label"}}}},"threads":{"methods":{"trash":{"scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify"],"httpMethod":"POST","parameterOrder":["userId","id"],"path":"gmail/v1/users/{userId}/threads/{id}/trash","flatPath":"gmail/v1/users/{userId}/threads/{id}/trash","response":{"$ref":"Thread"},"parameters":{"userId":{"location":"path","description":"The user's email address. The special value `me` can be used to indicate the authenticated user.","required":true,"type":"string","default":"me"},"id":{"location":"path","required":true,"description":"The ID of the thread to Trash.","type":"string"}},"description":"Moves the specified thread to the trash. Any messages that belong to the thread are also moved to the trash. For more information, see [Manage threads](https://developers.google.com/workspace/gmail/api/guides/threads).","id":"gmail.users.threads.trash"},"untrash":{"scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify"],"path":"gmail/v1/users/{userId}/threads/{id}/untrash","httpMethod":"POST","parameterOrder":["userId","id"],"flatPath":"gmail/v1/users/{userId}/threads/{id}/untrash","response":{"$ref":"Thread"},"parameters":{"userId":{"type":"string","default":"me","required":true,"description":"The user's email address. The special value `me` can be used to indicate the authenticated user.","location":"path"},"id":{"location":"path","required":true,"description":"The ID of the thread to remove from Trash.","type":"string"}},"id":"gmail.users.threads.untrash","description":"Removes the specified thread from the trash. Any messages that belong to the thread are also removed from the trash. For more information, see [Manage threads](https://developers.google.com/workspace/gmail/api/guides/threads)."},"delete":{"parameters":{"userId":{"default":"me","type":"string","required":true,"description":"The user's email address. The special value `me` can be used to indicate the authenticated user.","location":"path"},"id":{"location":"path","required":true,"description":"ID of the Thread to delete.","type":"string"}},"flatPath":"gmail/v1/users/{userId}/threads/{id}","scopes":["https://mail.google.com/"],"id":"gmail.users.threads.delete","path":"gmail/v1/users/{userId}/threads/{id}","parameterOrder":["userId","id"],"httpMethod":"DELETE","description":"Immediately and permanently deletes the specified thread. Any messages that belong to the thread are also deleted. This operation cannot be undone. Prefer `threads.trash` instead. For more information, see [Manage threads](https://developers.google.com/workspace/gmail/api/guides/threads)."},"get":{"scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.addons.current.message.action","https://www.googleapis.com/auth/gmail.addons.current.message.metadata","https://www.googleapis.com/auth/gmail.addons.current.message.readonly","https://www.googleapis.com/auth/gmail.metadata","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly"],"parameterOrder":["userId","id"],"httpMethod":"GET","path":"gmail/v1/users/{userId}/threads/{id}","parameters":{"format":{"description":"The format to return the messages in.","location":"query","type":"string","default":"full","enumDescriptions":["Returns the full email message data with body content parsed in the `payload` field; the `raw` field is not used. Format cannot be used when accessing the api using the gmail.metadata scope.","Returns only email message IDs, labels, and email headers.","Returns only email message IDs and labels; does not return the email headers, body, or payload."],"enum":["full","metadata","minimal"]},"metadataHeaders":{"location":"query","repeated":true,"description":"When given and format is METADATA, only include headers specified.","type":"string"},"userId":{"description":"The user's email address. The special value `me` can be used to indicate the authenticated user.","location":"path","default":"me","type":"string","required":true},"id":{"location":"path","required":true,"description":"The ID of the thread to retrieve.","type":"string"}},"flatPath":"gmail/v1/users/{userId}/threads/{id}","response":{"$ref":"Thread"},"description":"Gets the specified thread. For more information, see [Manage threads](https://developers.google.com/workspace/gmail/api/guides/threads).","id":"gmail.users.threads.get"},"list":{"flatPath":"gmail/v1/users/{userId}/threads","response":{"$ref":"ListThreadsResponse"},"parameters":{"q":{"location":"query","description":"Only return threads matching the specified query. Supports the same query format as the Gmail search box. For example, `\"from:someuser@example.com rfc822msgid: is:unread\"`. Parameter cannot be used when accessing the api using the gmail.metadata scope.","type":"string"},"userId":{"location":"path","description":"The user's email address. The special value `me` can be used to indicate the authenticated user.","required":true,"type":"string","default":"me"},"pageToken":{"description":"Page token to retrieve a specific page of results in the list.","type":"string","location":"query"},"labelIds":{"location":"query","description":"Only return threads with labels that match all of the specified label IDs.","type":"string","repeated":true},"maxResults":{"type":"integer","format":"uint32","default":"100","description":"Maximum number of threads to return. This field defaults to 100. The maximum allowed value for this field is 500.","location":"query"},"includeSpamTrash":{"location":"query","default":"false","description":"Include threads from `SPAM` and `TRASH` in the results.","type":"boolean"}},"description":"Lists the threads in the user's mailbox. For more information, see [Manage threads](https://developers.google.com/workspace/gmail/api/guides/threads).","id":"gmail.users.threads.list","scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.metadata","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly"],"httpMethod":"GET","parameterOrder":["userId"],"path":"gmail/v1/users/{userId}/threads"},"modify":{"description":"Modifies the labels applied to the thread. This applies to all messages in the thread. For more information, see [Manage threads](https://developers.google.com/workspace/gmail/api/guides/threads).","id":"gmail.users.threads.modify","request":{"$ref":"ModifyThreadRequest"},"flatPath":"gmail/v1/users/{userId}/threads/{id}/modify","response":{"$ref":"Thread"},"parameters":{"userId":{"location":"path","description":"The user's email address. The special value `me` can be used to indicate the authenticated user.","required":true,"default":"me","type":"string"},"id":{"description":"The ID of the thread to modify.","type":"string","location":"path","required":true}},"httpMethod":"POST","parameterOrder":["userId","id"],"path":"gmail/v1/users/{userId}/threads/{id}/modify","scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.modify"]}}},"drafts":{"methods":{"delete":{"id":"gmail.users.drafts.delete","path":"gmail/v1/users/{userId}/drafts/{id}","parameterOrder":["userId","id"],"httpMethod":"DELETE","description":"Immediately and permanently deletes the specified draft. Does not simply trash it. For more information, see [Create and send draft emails](https://developers.google.com/workspace/gmail/api/guides/drafts).","parameters":{"userId":{"description":"The user's email address. The special value `me` can be used to indicate the authenticated user.","location":"path","type":"string","default":"me","required":true},"id":{"description":"The ID of the draft to delete.","type":"string","location":"path","required":true}},"flatPath":"gmail/v1/users/{userId}/drafts/{id}","scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.addons.current.action.compose","https://www.googleapis.com/auth/gmail.compose","https://www.googleapis.com/auth/gmail.modify"]},"create":{"parameters":{"userId":{"default":"me","type":"string","required":true,"description":"The user's email address. The special value `me` can be used to indicate the authenticated user.","location":"path"}},"flatPath":"gmail/v1/users/{userId}/drafts","response":{"$ref":"Draft"},"request":{"$ref":"Draft"},"id":"gmail.users.drafts.create","mediaUpload":{"maxSize":"36700160","protocols":{"resumable":{"multipart":true,"path":"/resumable/upload/gmail/v1/users/{userId}/drafts"},"simple":{"multipart":true,"path":"/upload/gmail/v1/users/{userId}/drafts"}},"accept":["message/*"]},"description":"Creates a draft with the `DRAFT` label. For more information, see [Create and send draft emails](https://developers.google.com/workspace/gmail/api/guides/drafts).","supportsMediaUpload":true,"scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.addons.current.action.compose","https://www.googleapis.com/auth/gmail.compose","https://www.googleapis.com/auth/gmail.modify"],"path":"gmail/v1/users/{userId}/drafts","parameterOrder":["userId"],"httpMethod":"POST"},"get":{"parameters":{"format":{"type":"string","default":"full","enumDescriptions":["Returns only email message ID and labels; does not return the email headers, body, or payload.","Returns the full email message data with body content parsed in the `payload` field; the `raw` field is not used. Format cannot be used when accessing the api using the gmail.metadata scope.","Returns the full email message data with body content in the `raw` field as a base64url encoded string; the `payload` field is not used. Format cannot be used when accessing the api using the gmail.metadata scope.","Returns only email message ID, labels, and email headers."],"enum":["minimal","full","raw","metadata"],"location":"query","description":"The format to return the draft in."},"userId":{"description":"The user's email address. The special value `me` can be used to indicate the authenticated user.","location":"path","default":"me","type":"string","required":true},"id":{"description":"The ID of the draft to retrieve.","type":"string","location":"path","required":true}},"flatPath":"gmail/v1/users/{userId}/drafts/{id}","response":{"$ref":"Draft"},"id":"gmail.users.drafts.get","description":"Gets the specified draft. For more information, see [Create and send draft emails](https://developers.google.com/workspace/gmail/api/guides/drafts).","scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.compose","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly"],"path":"gmail/v1/users/{userId}/drafts/{id}","parameterOrder":["userId","id"],"httpMethod":"GET"},"send":{"request":{"$ref":"Draft"},"parameters":{"userId":{"required":true,"type":"string","default":"me","location":"path","description":"The user's email address. The special value `me` can be used to indicate the authenticated user."}},"flatPath":"gmail/v1/users/{userId}/drafts/send","response":{"$ref":"Message"},"mediaUpload":{"maxSize":"36700160","protocols":{"resumable":{"path":"/resumable/upload/gmail/v1/users/{userId}/drafts/send","multipart":true},"simple":{"multipart":true,"path":"/upload/gmail/v1/users/{userId}/drafts/send"}},"accept":["message/*"]},"description":"Sends the specified, existing draft to the recipients in the `To`, `Cc`, and `Bcc` headers. For more information, see [Create and send draft emails](https://developers.google.com/workspace/gmail/api/guides/drafts).","id":"gmail.users.drafts.send","scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.addons.current.action.compose","https://www.googleapis.com/auth/gmail.compose","https://www.googleapis.com/auth/gmail.modify"],"supportsMediaUpload":true,"parameterOrder":["userId"],"httpMethod":"POST","path":"gmail/v1/users/{userId}/drafts/send"},"update":{"supportsMediaUpload":true,"scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.addons.current.action.compose","https://www.googleapis.com/auth/gmail.compose","https://www.googleapis.com/auth/gmail.modify"],"path":"gmail/v1/users/{userId}/drafts/{id}","parameterOrder":["userId","id"],"httpMethod":"PUT","parameters":{"userId":{"location":"path","description":"The user's email address. The special value `me` can be used to indicate the authenticated user.","required":true,"default":"me","type":"string"},"id":{"description":"The ID of the draft to update.","type":"string","location":"path","required":true}},"flatPath":"gmail/v1/users/{userId}/drafts/{id}","response":{"$ref":"Draft"},"request":{"$ref":"Draft"},"id":"gmail.users.drafts.update","mediaUpload":{"maxSize":"36700160","protocols":{"resumable":{"path":"/resumable/upload/gmail/v1/users/{userId}/drafts/{id}","multipart":true},"simple":{"path":"/upload/gmail/v1/users/{userId}/drafts/{id}","multipart":true}},"accept":["message/*"]},"description":"Replaces a draft's content. For more information, see [Create and send draft emails](https://developers.google.com/workspace/gmail/api/guides/drafts)."},"list":{"id":"gmail.users.drafts.list","description":"Lists the drafts in the user's mailbox. For more information, see [Create and send draft emails](https://developers.google.com/workspace/gmail/api/guides/drafts).","parameters":{"userId":{"location":"path","description":"The user's email address. The special value `me` can be used to indicate the authenticated user.","required":true,"type":"string","default":"me"},"q":{"description":"Only return draft messages matching the specified query. Supports the same query format as the Gmail search box. For example, `\"from:someuser@example.com rfc822msgid: is:unread\"`.","type":"string","location":"query"},"includeSpamTrash":{"default":"false","description":"Include drafts from `SPAM` and `TRASH` in the results.","type":"boolean","location":"query"},"maxResults":{"default":"100","type":"integer","format":"uint32","description":"Maximum number of drafts to return. This field defaults to 100. The maximum allowed value for this field is 500.","location":"query"},"pageToken":{"location":"query","description":"Page token to retrieve a specific page of results in the list.","type":"string"}},"flatPath":"gmail/v1/users/{userId}/drafts","response":{"$ref":"ListDraftsResponse"},"path":"gmail/v1/users/{userId}/drafts","parameterOrder":["userId"],"httpMethod":"GET","scopes":["https://mail.google.com/","https://www.googleapis.com/auth/gmail.compose","https://www.googleapis.com/auth/gmail.modify","https://www.googleapis.com/auth/gmail.readonly"]}}}}}},"kind":"discovery#restDescription","batchPath":"batch","rootUrl":"https://gmail.googleapis.com/","version":"v1","id":"gmail:v1","servicePath":"","parameters":{"alt":{"description":"Data format for response.","location":"query","default":"json","enum":["json","media","proto"],"enumDescriptions":["Responses with Content-Type of application/json","Media download with context-dependent Content-Type","Responses with Content-Type of application/x-protobuf"],"type":"string"},"callback":{"type":"string","description":"JSONP","location":"query"},"key":{"type":"string","description":"API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.","location":"query"},"oauth_token":{"location":"query","type":"string","description":"OAuth 2.0 token for the current user."},"access_token":{"type":"string","description":"OAuth access token.","location":"query"},"prettyPrint":{"location":"query","type":"boolean","description":"Returns response with indentations and line breaks.","default":"true"},"$.xgafv":{"type":"string","enum":["1","2"],"enumDescriptions":["v1 error format","v2 error format"],"location":"query","description":"V1 error format."},"uploadType":{"location":"query","type":"string","description":"Legacy upload protocol for media (e.g. \"media\", \"multipart\")."},"upload_protocol":{"type":"string","description":"Upload protocol for media (e.g. \"raw\", \"multipart\").","location":"query"},"quotaUser":{"location":"query","type":"string","description":"Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters."},"fields":{"type":"string","description":"Selector specifying which fields to include in a partial response.","location":"query"}},"name":"gmail"}