api reference · v1

Every Gmail method, from the index.

All 79 methods of the Gmail API, rendered at build time from the committed Discovery index the grr binary embeds — the same data grr api describe reads at runtime. Flags are kebab-cased parameter names: userId is --user-id.

79 methods · v1 · revision 20260921

gmail.users.drafts

6 methods

gmail.users.drafts.create

POST

grr gmail users drafts create gmail/v1/users/{userId}/drafts

Creates a draft with the `DRAFT` label. For more information, see Create and send draft emails.

Parameter Type Required Repeated Location Description Enum values
userId string yes — path The user's email address. The special value `me` can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.modify least privilege

4 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

grr gmail users drafts create
grr gmail users drafts create --user-id me --body-file ./body.json

gmail.users.drafts.delete

DELETE

grr gmail users drafts delete gmail/v1/users/{userId}/drafts/{id}

Immediately and permanently deletes the specified draft. Does not simply trash it. For more information, see Create and send draft emails.

Parameter Type Required Repeated Location Description Enum values
id string yes — path The ID of the draft to delete. —
userId string yes — path The user's email address. The special value `me` can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.modify least privilege

4 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

grr gmail users drafts delete
grr gmail users drafts delete --id <id> --user-id me

gmail.users.drafts.get

GET

grr gmail users drafts get gmail/v1/users/{userId}/drafts/{id}

Gets the specified draft. For more information, see Create and send draft emails.

Parameter Type Required Repeated Location Description Enum values
format string — — query The format to return the draft in. minimal · full · raw · metadata
id string yes — path The ID of the draft to retrieve. —
userId string yes — path The user's email address. The special value `me` can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.readonly least privilege

4 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

grr gmail users drafts get
grr gmail users drafts get --id <id> --user-id me

gmail.users.drafts.list

GET

grr gmail users drafts list gmail/v1/users/{userId}/drafts

Lists the drafts in the user's mailbox. For more information, see Create and send draft emails.

Parameter Type Required Repeated Location Description Enum values
includeSpamTrash boolean — — query Include drafts from `SPAM` and `TRASH` in the results. —
maxResults integer — — query Maximum number of drafts to return. This field defaults to 100. The maximum allowed value for this field is 500. —
pageToken string — — query Page token to retrieve a specific page of results in the list. —
q string — — query Only return draft messages matching the specified query. Supports the same query format as the Gmail search box. For example, `"from:someuser@example.com rfc822 —
userId string yes — path The user's email address. The special value `me` can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.readonly least privilege

4 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

grr gmail users drafts list
grr gmail users drafts list --user-id me

gmail.users.drafts.send

POST

grr gmail users drafts send gmail/v1/users/{userId}/drafts/send

Sends the specified, existing draft to the recipients in the `To`, `Cc`, and `Bcc` headers. For more information, see Create and send draft emails.

Parameter Type Required Repeated Location Description Enum values
userId string yes — path The user's email address. The special value `me` can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.modify least privilege

4 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

grr gmail users drafts send
grr gmail users drafts send --user-id me --body-file ./body.json

gmail.users.drafts.update

PUT

grr gmail users drafts update gmail/v1/users/{userId}/drafts/{id}

Replaces a draft's content. For more information, see Create and send draft emails.

Parameter Type Required Repeated Location Description Enum values
id string yes — path The ID of the draft to update. —
userId string yes — path The user's email address. The special value `me` can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.modify least privilege

4 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

grr gmail users drafts update
grr gmail users drafts update --id <id> --user-id me --body-file ./body.json

gmail.users

3 methods

gmail.users.getProfile

GET

grr gmail users getProfile gmail/v1/users/{userId}/profile

Gets the current user's Gmail profile.

Parameter Type Required Repeated Location Description Enum values
userId string yes — path The user's email address. The special value `me` can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.readonly least privilege

5 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

grr gmail users getProfile
grr gmail users getProfile --user-id me

gmail.users.stop

POST

grr gmail users stop gmail/v1/users/{userId}/stop

Turn off push notification delivery for the given user mailbox. For more information, see Configure push notifications in Gmail API.

Parameter Type Required Repeated Location Description Enum values
userId string yes — path The user's email address. The special value `me` can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.readonly least privilege

4 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

grr gmail users stop
grr gmail users stop --user-id me --body-file ./body.json

gmail.users.watch

POST

grr gmail users watch gmail/v1/users/{userId}/watch

Set up or update a push notification watch on the given user mailbox. For more information, see Configure push notifications in Gmail API.

Parameter Type Required Repeated Location Description Enum values
userId string yes — path The user's email address. The special value `me` can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.readonly least privilege

4 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

grr gmail users watch
grr gmail users watch --user-id me --body-file ./body.json

gmail.users.history

1 method

gmail.users.history.list

GET

grr gmail users history list gmail/v1/users/{userId}/history

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.

Parameter Type Required Repeated Location Description Enum values
historyTypes string — yes query History types to be returned by the function messageAdded · messageDeleted · labelAdded · labelRemoved
labelId string — — query Only return messages with a label matching the ID. —
maxResults integer — — query Maximum number of history records to return. This field defaults to 100. The maximum allowed value for this field is 500. —
pageToken string — — query Page token to retrieve a specific page of results in the list. —
startHistoryId string — — query Required. Returns history records after the specified `startHistoryId`. The supplied `startHistoryId` should be obtained from the `historyId` of a message, thre —
userId string yes — path The user's email address. The special value `me` can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.readonly least privilege

4 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

grr gmail users history list
grr gmail users history list --user-id me

gmail.users.labels

6 methods

gmail.users.labels.create

POST

grr gmail users labels create gmail/v1/users/{userId}/labels

Creates a label. For more information, see Manage labels.

Parameter Type Required Repeated Location Description Enum values
userId string yes — path The user's email address. The special value `me` can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.modify least privilege

3 scopes
  • https://mail.google.com/
  • https://www.googleapis.com/auth/gmail.labels
  • https://www.googleapis.com/auth/gmail.modify

grr gmail users labels create
grr gmail users labels create --user-id me --body-file ./body.json

gmail.users.labels.delete

DELETE

grr gmail users labels delete gmail/v1/users/{userId}/labels/{id}

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.

Parameter Type Required Repeated Location Description Enum values
id string yes — path The ID of the label to delete. —
userId string yes — path The user's email address. The special value `me` can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.modify least privilege

3 scopes
  • https://mail.google.com/
  • https://www.googleapis.com/auth/gmail.labels
  • https://www.googleapis.com/auth/gmail.modify

grr gmail users labels delete
grr gmail users labels delete --id <id> --user-id me

gmail.users.labels.get

GET

grr gmail users labels get gmail/v1/users/{userId}/labels/{id}

Gets the specified label. For more information, see Manage labels.

Parameter Type Required Repeated Location Description Enum values
id string yes — path The ID of the label to retrieve. —
userId string yes — path The user's email address. The special value `me` can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.readonly least privilege

5 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

grr gmail users labels get
grr gmail users labels get --id <id> --user-id me

gmail.users.labels.list

GET

grr gmail users labels list gmail/v1/users/{userId}/labels

Lists all labels in the user's mailbox. For more information, see Manage labels.

Parameter Type Required Repeated Location Description Enum values
userId string yes — path The user's email address. The special value `me` can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.readonly least privilege

5 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

grr gmail users labels list
grr gmail users labels list --user-id me

gmail.users.labels.patch

PATCH

grr gmail users labels patch gmail/v1/users/{userId}/labels/{id}

Patch the specified label. For more information, see Manage labels.

Parameter Type Required Repeated Location Description Enum values
id string yes — path The ID of the label to update. —
userId string yes — path The user's email address. The special value `me` can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.modify least privilege

3 scopes
  • https://mail.google.com/
  • https://www.googleapis.com/auth/gmail.labels
  • https://www.googleapis.com/auth/gmail.modify

grr gmail users labels patch
grr gmail users labels patch --id <id> --user-id me --body-file ./body.json

gmail.users.labels.update

PUT

grr gmail users labels update gmail/v1/users/{userId}/labels/{id}

Updates the specified label. For more information, see Manage labels.

Parameter Type Required Repeated Location Description Enum values
id string yes — path The ID of the label to update. —
userId string yes — path The user's email address. The special value `me` can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.modify least privilege

3 scopes
  • https://mail.google.com/
  • https://www.googleapis.com/auth/gmail.labels
  • https://www.googleapis.com/auth/gmail.modify

grr gmail users labels update
grr gmail users labels update --id <id> --user-id me --body-file ./body.json

gmail.users.messages.attachments

1 method

gmail.users.messages.attachments.get

GET

grr gmail users messages attachments get gmail/v1/users/{userId}/messages/{messageId}/attachments/{id}

Gets the specified message attachment.

Parameter Type Required Repeated Location Description Enum values
id string yes — path The ID of the attachment. —
messageId string yes — path The ID of the message containing the attachment. —
userId string yes — path The user's email address. The special value `me` can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.readonly least privilege

5 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

grr gmail users messages attachments get
grr gmail users messages attachments get --id <id> --message-id <message-id> --user-id me

gmail.users.messages

11 methods

gmail.users.messages.batchDelete

POST

grr gmail users messages batchDelete gmail/v1/users/{userId}/messages/batchDelete

Deletes many messages by message ID. Provides no guarantees that messages were not already deleted or even existed at all.

Parameter Type Required Repeated Location Description Enum values
userId string yes — path The user's email address. The special value `me` can be used to indicate the authenticated user. —

https://mail.google.com/ least privilege

1 scope
  • https://mail.google.com/

grr gmail users messages batchDelete
grr gmail users messages batchDelete --user-id me --body-file ./body.json

gmail.users.messages.batchModify

POST

grr gmail users messages batchModify gmail/v1/users/{userId}/messages/batchModify

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 that has [domain-wi

Parameter Type Required Repeated Location Description Enum values
userId string yes — path The user's email address. The special value `me` can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.modify least privilege

2 scopes
  • https://mail.google.com/
  • https://www.googleapis.com/auth/gmail.modify

grr gmail users messages batchModify
grr gmail users messages batchModify --user-id me --body-file ./body.json

gmail.users.messages.delete

DELETE

grr gmail users messages delete gmail/v1/users/{userId}/messages/{id}

Immediately and permanently deletes the specified message. This operation cannot be undone. Prefer `messages.trash` instead.

Parameter Type Required Repeated Location Description Enum values
id string yes — path The ID of the message to delete. —
userId string yes — path The user's email address. The special value `me` can be used to indicate the authenticated user. —

https://mail.google.com/ least privilege

1 scope
  • https://mail.google.com/

grr gmail users messages delete
grr gmail users messages delete --id <id> --user-id me

gmail.users.messages.get

GET

grr gmail users messages get gmail/v1/users/{userId}/messages/{id}

Gets the specified message.

Parameter Type Required Repeated Location Description Enum values
format string — — query The format to return the message in. minimal · full · raw · metadata
id string yes — path 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 (`messa —
metadataHeaders string — yes query When given and format is `METADATA`, only include headers specified. —
userId string yes — path The user's email address. The special value `me` can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.readonly least privilege

7 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

grr gmail users messages get
grr gmail users messages get --id <id> --user-id me

gmail.users.messages.import

POST

grr gmail users messages import gmail/v1/users/{userId}/messages/import

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

Parameter Type Required Repeated Location Description Enum values
deleted boolean — — query Mark the email as permanently deleted (not TRASH) and only visible in Google Vault to a Vault administrator. Only used for Google Workspace accounts. —
internalDateSource string — — query Source for Gmail's internal date of the message. receivedTime · dateHeader
neverMarkSpam boolean — — query Ignore the Gmail spam classifier decision and never mark this email as SPAM in the mailbox. —
processForCalendar boolean — — query Process calendar invites in the email and add any extracted meetings to the Google Calendar for this user. —
userId string yes — path The user's email address. The special value `me` can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.modify least privilege

3 scopes
  • https://mail.google.com/
  • https://www.googleapis.com/auth/gmail.insert
  • https://www.googleapis.com/auth/gmail.modify

grr gmail users messages import
grr gmail users messages import --user-id me --body-file ./body.json

gmail.users.messages.insert

POST

grr gmail users messages insert gmail/v1/users/{userId}/messages

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.

Parameter Type Required Repeated Location Description Enum values
deleted boolean — — query Mark the email as permanently deleted (not TRASH) and only visible in Google Vault to a Vault administrator. Only used for Google Workspace accounts. —
internalDateSource string — — query Source for Gmail's internal date of the message. receivedTime · dateHeader
userId string yes — path The user's email address. The special value `me` can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.modify least privilege

3 scopes
  • https://mail.google.com/
  • https://www.googleapis.com/auth/gmail.insert
  • https://www.googleapis.com/auth/gmail.modify

grr gmail users messages insert
grr gmail users messages insert --user-id me --body-file ./body.json

gmail.users.messages.list

GET

grr gmail users messages list gmail/v1/users/{userId}/messages

Lists the messages in the user's mailbox. For more information, see List Gmail messages.

Parameter Type Required Repeated Location Description Enum values
includeSpamTrash boolean — — query Include messages from `SPAM` and `TRASH` in the results. —
labelIds string — yes query 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 —
maxResults integer — — query Maximum number of messages to return. This field defaults to 100. The maximum allowed value for this field is 500. —
pageToken string — — query Page token to retrieve a specific page of results in the list. —
q string — — query Only return messages matching the specified query. Supports the same query format as the Gmail search box. For example, `"from:someuser@example.com rfc822msgid: —
userId string yes — path The user's email address. The special value `me` can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.readonly least privilege

4 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

grr gmail users messages list
grr gmail users messages list --user-id me

gmail.users.messages.modify

POST

grr gmail users messages modify gmail/v1/users/{userId}/messages/{id}/modify

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 that has [domain-wide

Parameter Type Required Repeated Location Description Enum values
id string yes — path The ID of the message to modify. —
userId string yes — path The user's email address. The special value `me` can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.modify least privilege

2 scopes
  • https://mail.google.com/
  • https://www.googleapis.com/auth/gmail.modify

grr gmail users messages modify
grr gmail users messages modify --id <id> --user-id me --body-file ./body.json

gmail.users.messages.send

POST

grr gmail users messages send gmail/v1/users/{userId}/messages/send

Sends the specified message to the recipients in the `To`, `Cc`, and `Bcc` headers. For more information, see Create and send email messages.

Parameter Type Required Repeated Location Description Enum values
userId string yes — path The user's email address. The special value `me` can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.send least privilege

5 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

grr gmail users messages send
grr gmail users messages send --user-id me --body-file ./body.json

gmail.users.messages.trash

POST

grr gmail users messages trash gmail/v1/users/{userId}/messages/{id}/trash

Moves the specified message to the trash.

Parameter Type Required Repeated Location Description Enum values
id string yes — path The ID of the message to Trash. —
userId string yes — path The user's email address. The special value `me` can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.modify least privilege

2 scopes
  • https://mail.google.com/
  • https://www.googleapis.com/auth/gmail.modify

grr gmail users messages trash
grr gmail users messages trash --id <id> --user-id me --body-file ./body.json

gmail.users.messages.untrash

POST

grr gmail users messages untrash gmail/v1/users/{userId}/messages/{id}/untrash

Removes the specified message from the trash.

Parameter Type Required Repeated Location Description Enum values
id string yes — path The ID of the message to remove from Trash. —
userId string yes — path The user's email address. The special value `me` can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.modify least privilege

2 scopes
  • https://mail.google.com/
  • https://www.googleapis.com/auth/gmail.modify

grr gmail users messages untrash
grr gmail users messages untrash --id <id> --user-id me --body-file ./body.json

gmail.users.settings.cse.identities

5 methods

gmail.users.settings.cse.identities.create

POST

grr gmail users settings cse identities create gmail/v1/users/{userId}/settings/cse/identities

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

Parameter Type Required Repeated Location Description Enum values
userId string yes — path The requester's primary email address. To indicate the authenticated user, you can use the special value `me`. —

https://www.googleapis.com/auth/gmail.settings.sharing least privilege

2 scopes
  • https://www.googleapis.com/auth/gmail.settings.basic
  • https://www.googleapis.com/auth/gmail.settings.sharing

grr gmail users settings cse identities create
grr gmail users settings cse identities create --user-id me --body-file ./body.json

gmail.users.settings.cse.identities.delete

DELETE

grr gmail users settings cse identities delete gmail/v1/users/{userId}/settings/cse/identities/{cseEmailAddress}

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 manag

Parameter Type Required Repeated Location Description Enum values
cseEmailAddress string yes — path The primary email address associated with the client-side encryption identity configuration that's removed. —
userId string yes — path The requester's primary email address. To indicate the authenticated user, you can use the special value `me`. —

https://www.googleapis.com/auth/gmail.settings.sharing least privilege

2 scopes
  • https://www.googleapis.com/auth/gmail.settings.basic
  • https://www.googleapis.com/auth/gmail.settings.sharing

grr gmail users settings cse identities delete
grr gmail users settings cse identities delete --cse-email-address <cse-email-address> --user-id me

gmail.users.settings.cse.identities.get

GET

grr gmail users settings cse identities get gmail/v1/users/{userId}/settings/cse/identities/{cseEmailAddress}

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 that has [domain-wide delegat

Parameter Type Required Repeated Location Description Enum values
cseEmailAddress string yes — path The primary email address associated with the client-side encryption identity configuration that's retrieved. —
userId string yes — path The requester's primary email address. To indicate the authenticated user, you can use the special value `me`. —

https://www.googleapis.com/auth/gmail.settings.sharing least privilege

5 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

grr gmail users settings cse identities get
grr gmail users settings cse identities get --cse-email-address <cse-email-address> --user-id me

gmail.users.settings.cse.identities.list

GET

grr gmail users settings cse identities list gmail/v1/users/{userId}/settings/cse/identities

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 that has [domain-w

Parameter Type Required Repeated Location Description Enum values
pageSize integer — — query The number of identities to return. If not provided, the page size will default to 20 entries. —
pageToken string — — query 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. —
userId string yes — path The requester's primary email address. To indicate the authenticated user, you can use the special value `me`. —

https://www.googleapis.com/auth/gmail.settings.sharing least privilege

5 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

grr gmail users settings cse identities list
grr gmail users settings cse identities list --user-id me

gmail.users.settings.cse.identities.patch

PATCH

grr gmail users settings cse identities patch gmail/v1/users/{userId}/settings/cse/identities/{emailAddress}

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. For administrators managing identities and keypairs for users in their organization, reque

Parameter Type Required Repeated Location Description Enum values
emailAddress string yes — path The email address of the client-side encryption identity to update. —
userId string yes — path The requester's primary email address. To indicate the authenticated user, you can use the special value `me`. —

https://www.googleapis.com/auth/gmail.settings.sharing least privilege

2 scopes
  • https://www.googleapis.com/auth/gmail.settings.basic
  • https://www.googleapis.com/auth/gmail.settings.sharing

grr gmail users settings cse identities patch
grr gmail users settings cse identities patch --email-address <email-address> --user-id me --body-file ./body.json

gmail.users.settings.cse.keypairs

6 methods

gmail.users.settings.cse.keypairs.create

POST

grr gmail users settings cse keypairs create gmail/v1/users/{userId}/settings/cse/keypairs

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

Parameter Type Required Repeated Location Description Enum values
chainValidation string — — query The type of certificate chain validation to perform at creation. The request will be rejected if the uploaded chain fails to satisfy the requested validation ch all · none
userId string yes — path The requester's primary email address. To indicate the authenticated user, you can use the special value `me`. —

https://www.googleapis.com/auth/gmail.settings.sharing least privilege

2 scopes
  • https://www.googleapis.com/auth/gmail.settings.basic
  • https://www.googleapis.com/auth/gmail.settings.sharing

grr gmail users settings cse keypairs create
grr gmail users settings cse keypairs create --user-id me --body-file ./body.json

gmail.users.settings.cse.keypairs.disable

POST

grr gmail users settings cse keypairs disable gmail/v1/users/{userId}/settings/cse/keypairs/{keyPairId}:disable

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

Parameter Type Required Repeated Location Description Enum values
keyPairId string yes — path The identifier of the key pair to turn off. —
userId string yes — path The requester's primary email address. To indicate the authenticated user, you can use the special value `me`. —

https://www.googleapis.com/auth/gmail.settings.sharing least privilege

2 scopes
  • https://www.googleapis.com/auth/gmail.settings.basic
  • https://www.googleapis.com/auth/gmail.settings.sharing

grr gmail users settings cse keypairs disable
grr gmail users settings cse keypairs disable --key-pair-id <key-pair-id> --user-id me --body-file ./body.json

gmail.users.settings.cse.keypairs.enable

POST

grr gmail users settings cse keypairs enable gmail/v1/users/{userId}/settings/cse/keypairs/{keyPairId}:enable

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:/

Parameter Type Required Repeated Location Description Enum values
keyPairId string yes — path The identifier of the key pair to turn on. —
userId string yes — path The requester's primary email address. To indicate the authenticated user, you can use the special value `me`. —

https://www.googleapis.com/auth/gmail.settings.sharing least privilege

2 scopes
  • https://www.googleapis.com/auth/gmail.settings.basic
  • https://www.googleapis.com/auth/gmail.settings.sharing

grr gmail users settings cse keypairs enable
grr gmail users settings cse keypairs enable --key-pair-id <key-pair-id> --user-id me --body-file ./body.json

gmail.users.settings.cse.keypairs.get

GET

grr gmail users settings cse keypairs get gmail/v1/users/{userId}/settings/cse/keypairs/{keyPairId}

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 that has [domain-wide delegation

Parameter Type Required Repeated Location Description Enum values
keyPairId string yes — path The identifier of the key pair to retrieve. —
userId string yes — path The requester's primary email address. To indicate the authenticated user, you can use the special value `me`. —

https://www.googleapis.com/auth/gmail.settings.sharing least privilege

5 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

grr gmail users settings cse keypairs get
grr gmail users settings cse keypairs get --key-pair-id <key-pair-id> --user-id me

gmail.users.settings.cse.keypairs.list

GET

grr gmail users settings cse keypairs list gmail/v1/users/{userId}/settings/cse/keypairs

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 that has [domain-wide

Parameter Type Required Repeated Location Description Enum values
pageSize integer — — query The number of key pairs to return. If not provided, the page size will default to 20 entries. —
pageToken string — — query 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. —
userId string yes — path The requester's primary email address. To indicate the authenticated user, you can use the special value `me`. —

https://www.googleapis.com/auth/gmail.settings.sharing least privilege

5 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

grr gmail users settings cse keypairs list
grr gmail users settings cse keypairs list --user-id me

gmail.users.settings.cse.keypairs.obliterate

POST

grr gmail users settings cse keypairs obliterate gmail/v1/users/{userId}/settings/cse/keypairs/{keyPairId}:obliterate

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 obliterate

Parameter Type Required Repeated Location Description Enum values
keyPairId string yes — path The identifier of the key pair to obliterate. —
userId string yes — path The requester's primary email address. To indicate the authenticated user, you can use the special value `me`. —

https://www.googleapis.com/auth/gmail.settings.sharing least privilege

2 scopes
  • https://www.googleapis.com/auth/gmail.settings.basic
  • https://www.googleapis.com/auth/gmail.settings.sharing

grr gmail users settings cse keypairs obliterate
grr gmail users settings cse keypairs obliterate --key-pair-id <key-pair-id> --user-id me --body-file ./body.json

gmail.users.settings.delegates

4 methods

gmail.users.settings.delegates.create

POST

grr gmail users settings delegates create gmail/v1/users/{userId}/settings/delegates

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/gm

Parameter Type Required Repeated Location Description Enum values
userId string yes — path User's email address. The special value "me" can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.settings.sharing least privilege

1 scope
  • https://www.googleapis.com/auth/gmail.settings.sharing

grr gmail users settings delegates create
grr gmail users settings delegates create --user-id me --body-file ./body.json

gmail.users.settings.delegates.delete

DELETE

grr gmail users settings delegates delete gmail/v1/users/{userId}/settings/delegates/{delegateEmail}

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. A delegate user must be referred

Parameter Type Required Repeated Location Description Enum values
delegateEmail string yes — path The email address of the user to be removed as a delegate. —
userId string yes — path User's email address. The special value "me" can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.settings.sharing least privilege

1 scope
  • https://www.googleapis.com/auth/gmail.settings.sharing

grr gmail users settings delegates delete
grr gmail users settings delegates delete --delegate-email <delegate-email> --user-id me

gmail.users.settings.delegates.get

GET

grr gmail users settings delegates get gmail/v1/users/{userId}/settings/delegates/{delegateEmail}

Gets the specified delegate. For more information, see Manage delegates. 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

Parameter Type Required Repeated Location Description Enum values
delegateEmail string yes — path The email address of the user whose delegate relationship is to be retrieved. —
userId string yes — path User's email address. The special value "me" can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.settings.basic least privilege

4 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

grr gmail users settings delegates get
grr gmail users settings delegates get --delegate-email <delegate-email> --user-id me

gmail.users.settings.delegates.list

GET

grr gmail users settings delegates list gmail/v1/users/{userId}/settings/delegates

Lists the delegates for the specified account. For more information, see Manage delegates. This method is only available to service account clients that have been delegated domain-wide authority.

Parameter Type Required Repeated Location Description Enum values
userId string yes — path User's email address. The special value "me" can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.settings.basic least privilege

4 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

grr gmail users settings delegates list
grr gmail users settings delegates list --user-id me

gmail.users.settings.filters

4 methods

gmail.users.settings.filters.create

POST

grr gmail users settings filters create gmail/v1/users/{userId}/settings/filters

Creates a filter. Note: you can only create a maximum of 1,000 filters. For more information, see Manage Gmail filters.

Parameter Type Required Repeated Location Description Enum values
userId string yes — path User's email address. The special value "me" can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.settings.basic least privilege

1 scope
  • https://www.googleapis.com/auth/gmail.settings.basic

grr gmail users settings filters create
grr gmail users settings filters create --user-id me --body-file ./body.json

gmail.users.settings.filters.delete

DELETE

grr gmail users settings filters delete gmail/v1/users/{userId}/settings/filters/{id}

Immediately and permanently deletes the specified filter. For more information, see Manage Gmail filters.

Parameter Type Required Repeated Location Description Enum values
id string yes — path The ID of the filter to be deleted. —
userId string yes — path User's email address. The special value "me" can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.settings.basic least privilege

1 scope
  • https://www.googleapis.com/auth/gmail.settings.basic

grr gmail users settings filters delete
grr gmail users settings filters delete --id <id> --user-id me

gmail.users.settings.filters.get

GET

grr gmail users settings filters get gmail/v1/users/{userId}/settings/filters/{id}

Gets a filter. For more information, see Manage Gmail filters.

Parameter Type Required Repeated Location Description Enum values
id string yes — path The ID of the filter to be fetched. —
userId string yes — path User's email address. The special value "me" can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.settings.basic least privilege

4 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

grr gmail users settings filters get
grr gmail users settings filters get --id <id> --user-id me

gmail.users.settings.filters.list

GET

grr gmail users settings filters list gmail/v1/users/{userId}/settings/filters

Lists the message filters of a Gmail user. For more information, see Manage Gmail filters.

Parameter Type Required Repeated Location Description Enum values
userId string yes — path User's email address. The special value "me" can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.settings.basic least privilege

4 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

grr gmail users settings filters list
grr gmail users settings filters list --user-id me

gmail.users.settings.forwardingAddresses

4 methods

gmail.users.settings.forwardingAddresses.create

POST

grr gmail users settings forwardingAddresses create gmail/v1/users/{userId}/settings/forwardingAddresses

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 fo

Parameter Type Required Repeated Location Description Enum values
userId string yes — path User's email address. The special value "me" can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.settings.sharing least privilege

1 scope
  • https://www.googleapis.com/auth/gmail.settings.sharing

grr gmail users settings forwardingAddresses create
grr gmail users settings forwardingAddresses create --user-id me --body-file ./body.json

gmail.users.settings.forwardingAddresses.delete

DELETE

grr gmail users settings forwardingAddresses delete gmail/v1/users/{userId}/settings/forwardingAddresses/{forwardingEmail}

Deletes the specified forwarding address and revokes any verification that may have been required. For more information, see Manage email forwarding. This method is only available to service account clients that have bee

Parameter Type Required Repeated Location Description Enum values
forwardingEmail string yes — path The forwarding address to be deleted. —
userId string yes — path User's email address. The special value "me" can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.settings.sharing least privilege

1 scope
  • https://www.googleapis.com/auth/gmail.settings.sharing

grr gmail users settings forwardingAddresses delete
grr gmail users settings forwardingAddresses delete --forwarding-email <forwarding-email> --user-id me

gmail.users.settings.forwardingAddresses.get

GET

grr gmail users settings forwardingAddresses get gmail/v1/users/{userId}/settings/forwardingAddresses/{forwardingEmail}

Gets the specified forwarding address. For more information, see Manage email forwarding.

Parameter Type Required Repeated Location Description Enum values
forwardingEmail string yes — path The forwarding address to be retrieved. —
userId string yes — path User's email address. The special value "me" can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.settings.basic least privilege

4 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

grr gmail users settings forwardingAddresses get
grr gmail users settings forwardingAddresses get --forwarding-email <forwarding-email> --user-id me

gmail.users.settings.forwardingAddresses.list

GET

grr gmail users settings forwardingAddresses list gmail/v1/users/{userId}/settings/forwardingAddresses

Lists the forwarding addresses for the specified account. For more information, see Manage email forwarding.

Parameter Type Required Repeated Location Description Enum values
userId string yes — path User's email address. The special value "me" can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.settings.basic least privilege

4 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

grr gmail users settings forwardingAddresses list
grr gmail users settings forwardingAddresses list --user-id me

gmail.users.settings

10 methods

gmail.users.settings.getAutoForwarding

GET

grr gmail users settings getAutoForwarding gmail/v1/users/{userId}/settings/autoForwarding

Gets the auto-forwarding setting for the specified account. For more information, see Manage email forwarding.

Parameter Type Required Repeated Location Description Enum values
userId string yes — path User's email address. The special value "me" can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.settings.basic least privilege

4 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

grr gmail users settings getAutoForwarding
grr gmail users settings getAutoForwarding --user-id me

gmail.users.settings.getImap

GET

grr gmail users settings getImap gmail/v1/users/{userId}/settings/imap

Gets IMAP settings. For more information, see Configure POP and IMAP settings with the Gmail API.

Parameter Type Required Repeated Location Description Enum values
userId string yes — path User's email address. The special value "me" can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.settings.basic least privilege

4 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

grr gmail users settings getImap
grr gmail users settings getImap --user-id me

gmail.users.settings.getLanguage

GET

grr gmail users settings getLanguage gmail/v1/users/{userId}/settings/language

Gets language settings. For more information, see Manage language settings.

Parameter Type Required Repeated Location Description Enum values
userId string yes — path User's email address. The special value "me" can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.settings.basic least privilege

4 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

grr gmail users settings getLanguage
grr gmail users settings getLanguage --user-id me

gmail.users.settings.getPop

GET

grr gmail users settings getPop gmail/v1/users/{userId}/settings/pop

Gets POP settings. For more information, see Configure POP and IMAP settings with the Gmail API.

Parameter Type Required Repeated Location Description Enum values
userId string yes — path User's email address. The special value "me" can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.settings.basic least privilege

4 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

grr gmail users settings getPop
grr gmail users settings getPop --user-id me

gmail.users.settings.getVacation

GET

grr gmail users settings getVacation gmail/v1/users/{userId}/settings/vacation

Gets vacation responder settings. For more information, see Manage vacation settings with the Gmail API.

Parameter Type Required Repeated Location Description Enum values
userId string yes — path User's email address. The special value "me" can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.settings.basic least privilege

4 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

grr gmail users settings getVacation
grr gmail users settings getVacation --user-id me

gmail.users.settings.updateAutoForwarding

PUT

grr gmail users settings updateAutoForwarding gmail/v1/users/{userId}/settings/autoForwarding

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. This method is only avail

Parameter Type Required Repeated Location Description Enum values
userId string yes — path User's email address. The special value "me" can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.settings.sharing least privilege

1 scope
  • https://www.googleapis.com/auth/gmail.settings.sharing

grr gmail users settings updateAutoForwarding
grr gmail users settings updateAutoForwarding --user-id me --body-file ./body.json

gmail.users.settings.updateImap

PUT

grr gmail users settings updateImap gmail/v1/users/{userId}/settings/imap

Updates IMAP settings. For more information, see Configure POP and IMAP settings with the Gmail API.

Parameter Type Required Repeated Location Description Enum values
userId string yes — path User's email address. The special value "me" can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.settings.basic least privilege

1 scope
  • https://www.googleapis.com/auth/gmail.settings.basic

grr gmail users settings updateImap
grr gmail users settings updateImap --user-id me --body-file ./body.json

gmail.users.settings.updateLanguage

PUT

grr gmail users settings updateLanguage gmail/v1/users/{userId}/settings/language

Updates language settings. For more information, see Manage 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 re

Parameter Type Required Repeated Location Description Enum values
userId string yes — path User's email address. The special value "me" can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.settings.basic least privilege

1 scope
  • https://www.googleapis.com/auth/gmail.settings.basic

grr gmail users settings updateLanguage
grr gmail users settings updateLanguage --user-id me --body-file ./body.json

gmail.users.settings.updatePop

PUT

grr gmail users settings updatePop gmail/v1/users/{userId}/settings/pop

Updates POP settings. For more information, see Configure POP and IMAP settings with the Gmail API.

Parameter Type Required Repeated Location Description Enum values
userId string yes — path User's email address. The special value "me" can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.settings.basic least privilege

1 scope
  • https://www.googleapis.com/auth/gmail.settings.basic

grr gmail users settings updatePop
grr gmail users settings updatePop --user-id me --body-file ./body.json

gmail.users.settings.updateVacation

PUT

grr gmail users settings updateVacation gmail/v1/users/{userId}/settings/vacation

Updates vacation responder settings. For more information, see Manage vacation settings with the Gmail API.

Parameter Type Required Repeated Location Description Enum values
userId string yes — path User's email address. The special value "me" can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.settings.basic least privilege

1 scope
  • https://www.googleapis.com/auth/gmail.settings.basic

grr gmail users settings updateVacation
grr gmail users settings updateVacation --user-id me --body-file ./body.json

gmail.users.settings.sendAs

7 methods

gmail.users.settings.sendAs.create

POST

grr gmail users settings sendAs create gmail/v1/users/{userId}/settings/sendAs

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 verificat

Parameter Type Required Repeated Location Description Enum values
userId string yes — path User's email address. The special value "me" can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.settings.sharing least privilege

1 scope
  • https://www.googleapis.com/auth/gmail.settings.sharing

grr gmail users settings sendAs create
grr gmail users settings sendAs create --user-id me --body-file ./body.json

gmail.users.settings.sendAs.delete

DELETE

grr gmail users settings sendAs delete gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}

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. This method is only available t

Parameter Type Required Repeated Location Description Enum values
sendAsEmail string yes — path The send-as alias to be deleted. —
userId string yes — path User's email address. The special value "me" can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.settings.sharing least privilege

1 scope
  • https://www.googleapis.com/auth/gmail.settings.sharing

grr gmail users settings sendAs delete
grr gmail users settings sendAs delete --send-as-email <send-as-email> --user-id me

gmail.users.settings.sendAs.get

GET

grr gmail users settings sendAs get gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}

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.

Parameter Type Required Repeated Location Description Enum values
sendAsEmail string yes — path The send-as alias to be retrieved. —
userId string yes — path User's email address. The special value "me" can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.settings.basic least privilege

4 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

grr gmail users settings sendAs get
grr gmail users settings sendAs get --send-as-email <send-as-email> --user-id me

gmail.users.settings.sendAs.list

GET

grr gmail users settings sendAs list gmail/v1/users/{userId}/settings/sendAs

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

Parameter Type Required Repeated Location Description Enum values
userId string yes — path User's email address. The special value "me" can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.settings.basic least privilege

4 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

grr gmail users settings sendAs list
grr gmail users settings sendAs list --user-id me

gmail.users.settings.sendAs.patch

PATCH

grr gmail users settings sendAs patch gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}

Patch the specified send-as alias. For more information, see Manage aliases and signatures with the Gmail API.

Parameter Type Required Repeated Location Description Enum values
sendAsEmail string yes — path The send-as alias to be updated. —
userId string yes — path User's email address. The special value "me" can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.settings.sharing least privilege

2 scopes
  • https://www.googleapis.com/auth/gmail.settings.basic
  • https://www.googleapis.com/auth/gmail.settings.sharing

grr gmail users settings sendAs patch
grr gmail users settings sendAs patch --send-as-email <send-as-email> --user-id me --body-file ./body.json

gmail.users.settings.sendAs.update

PUT

grr gmail users settings sendAs update gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}

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. Addresses other than

Parameter Type Required Repeated Location Description Enum values
sendAsEmail string yes — path The send-as alias to be updated. —
userId string yes — path User's email address. The special value "me" can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.settings.sharing least privilege

2 scopes
  • https://www.googleapis.com/auth/gmail.settings.basic
  • https://www.googleapis.com/auth/gmail.settings.sharing

grr gmail users settings sendAs update
grr gmail users settings sendAs update --send-as-email <send-as-email> --user-id me --body-file ./body.json

gmail.users.settings.sendAs.verify

POST

grr gmail users settings sendAs verify gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/verify

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. This method is only avail

Parameter Type Required Repeated Location Description Enum values
sendAsEmail string yes — path The send-as alias to be verified. —
userId string yes — path User's email address. The special value "me" can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.settings.sharing least privilege

1 scope
  • https://www.googleapis.com/auth/gmail.settings.sharing

grr gmail users settings sendAs verify
grr gmail users settings sendAs verify --send-as-email <send-as-email> --user-id me --body-file ./body.json

gmail.users.settings.sendAs.smimeInfo

5 methods

gmail.users.settings.sendAs.smimeInfo.delete

DELETE

grr gmail users settings sendAs smimeInfo delete gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}

Deletes the specified S/MIME config for the specified send-as alias. For more information, see Manage S/MIME certificates with the Gmail API.

Parameter Type Required Repeated Location Description Enum values
id string yes — path The immutable ID for the SmimeInfo. —
sendAsEmail string yes — path The email address that appears in the "From:" header for mail sent using this alias. —
userId string yes — path The user's email address. The special value `me` can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.settings.sharing least privilege

2 scopes
  • https://www.googleapis.com/auth/gmail.settings.basic
  • https://www.googleapis.com/auth/gmail.settings.sharing

grr gmail users settings sendAs smimeInfo delete
grr gmail users settings sendAs smimeInfo delete --id <id> --send-as-email <send-as-email> --user-id me

gmail.users.settings.sendAs.smimeInfo.get

GET

grr gmail users settings sendAs smimeInfo get gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}

Gets the specified S/MIME config for the specified send-as alias. For more information, see Manage S/MIME certificates with the Gmail API.

Parameter Type Required Repeated Location Description Enum values
id string yes — path The immutable ID for the SmimeInfo. —
sendAsEmail string yes — path The email address that appears in the "From:" header for mail sent using this alias. —
userId string yes — path The user's email address. The special value `me` can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.settings.sharing least privilege

5 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

grr gmail users settings sendAs smimeInfo get
grr gmail users settings sendAs smimeInfo get --id <id> --send-as-email <send-as-email> --user-id me

gmail.users.settings.sendAs.smimeInfo.insert

POST

grr gmail users settings sendAs smimeInfo insert gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo

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.

Parameter Type Required Repeated Location Description Enum values
sendAsEmail string yes — path The email address that appears in the "From:" header for mail sent using this alias. —
userId string yes — path The user's email address. The special value `me` can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.settings.sharing least privilege

2 scopes
  • https://www.googleapis.com/auth/gmail.settings.basic
  • https://www.googleapis.com/auth/gmail.settings.sharing

grr gmail users settings sendAs smimeInfo insert
grr gmail users settings sendAs smimeInfo insert --send-as-email <send-as-email> --user-id me --body-file ./body.json

gmail.users.settings.sendAs.smimeInfo.list

GET

grr gmail users settings sendAs smimeInfo list gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo

Lists S/MIME configs for the specified send-as alias. For more information, see Manage S/MIME certificates with the Gmail API.

Parameter Type Required Repeated Location Description Enum values
sendAsEmail string yes — path The email address that appears in the "From:" header for mail sent using this alias. —
userId string yes — path The user's email address. The special value `me` can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.settings.sharing least privilege

5 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

grr gmail users settings sendAs smimeInfo list
grr gmail users settings sendAs smimeInfo list --send-as-email <send-as-email> --user-id me

gmail.users.settings.sendAs.smimeInfo.setDefault

POST

grr gmail users settings sendAs smimeInfo setDefault gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}/setDefault

Sets the default S/MIME config for the specified send-as alias. For more information, see Manage S/MIME certificates with the Gmail API.

Parameter Type Required Repeated Location Description Enum values
id string yes — path The immutable ID for the SmimeInfo. —
sendAsEmail string yes — path The email address that appears in the "From:" header for mail sent using this alias. —
userId string yes — path The user's email address. The special value `me` can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.settings.sharing least privilege

2 scopes
  • https://www.googleapis.com/auth/gmail.settings.basic
  • https://www.googleapis.com/auth/gmail.settings.sharing

grr gmail users settings sendAs smimeInfo setDefault
grr gmail users settings sendAs smimeInfo setDefault --id <id> --send-as-email <send-as-email> --user-id me --body-file ./body.json

gmail.users.threads

6 methods

gmail.users.threads.delete

DELETE

grr gmail users threads delete gmail/v1/users/{userId}/threads/{id}

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.

Parameter Type Required Repeated Location Description Enum values
id string yes — path ID of the Thread to delete. —
userId string yes — path The user's email address. The special value `me` can be used to indicate the authenticated user. —

https://mail.google.com/ least privilege

1 scope
  • https://mail.google.com/

grr gmail users threads delete
grr gmail users threads delete --id <id> --user-id me

gmail.users.threads.get

GET

grr gmail users threads get gmail/v1/users/{userId}/threads/{id}

Gets the specified thread. For more information, see Manage threads.

Parameter Type Required Repeated Location Description Enum values
format string — — query The format to return the messages in. full · metadata · minimal
id string yes — path The ID of the thread to retrieve. —
metadataHeaders string — yes query When given and format is METADATA, only include headers specified. —
userId string yes — path The user's email address. The special value `me` can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.readonly least privilege

7 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

grr gmail users threads get
grr gmail users threads get --id <id> --user-id me

gmail.users.threads.list

GET

grr gmail users threads list gmail/v1/users/{userId}/threads

Lists the threads in the user's mailbox. For more information, see Manage threads.

Parameter Type Required Repeated Location Description Enum values
includeSpamTrash boolean — — query Include threads from `SPAM` and `TRASH` in the results. —
labelIds string — yes query Only return threads with labels that match all of the specified label IDs. —
maxResults integer — — query Maximum number of threads to return. This field defaults to 100. The maximum allowed value for this field is 500. —
pageToken string — — query Page token to retrieve a specific page of results in the list. —
q string — — query Only return threads matching the specified query. Supports the same query format as the Gmail search box. For example, `"from:someuser@example.com rfc822msgid: —
userId string yes — path The user's email address. The special value `me` can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.readonly least privilege

4 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

grr gmail users threads list
grr gmail users threads list --user-id me

gmail.users.threads.modify

POST

grr gmail users threads modify gmail/v1/users/{userId}/threads/{id}/modify

Modifies the labels applied to the thread. This applies to all messages in the thread. For more information, see Manage threads.

Parameter Type Required Repeated Location Description Enum values
id string yes — path The ID of the thread to modify. —
userId string yes — path The user's email address. The special value `me` can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.modify least privilege

2 scopes
  • https://mail.google.com/
  • https://www.googleapis.com/auth/gmail.modify

grr gmail users threads modify
grr gmail users threads modify --id <id> --user-id me --body-file ./body.json

gmail.users.threads.trash

POST

grr gmail users threads trash gmail/v1/users/{userId}/threads/{id}/trash

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.

Parameter Type Required Repeated Location Description Enum values
id string yes — path The ID of the thread to Trash. —
userId string yes — path The user's email address. The special value `me` can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.modify least privilege

2 scopes
  • https://mail.google.com/
  • https://www.googleapis.com/auth/gmail.modify

grr gmail users threads trash
grr gmail users threads trash --id <id> --user-id me --body-file ./body.json

gmail.users.threads.untrash

POST

grr gmail users threads untrash gmail/v1/users/{userId}/threads/{id}/untrash

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.

Parameter Type Required Repeated Location Description Enum values
id string yes — path The ID of the thread to remove from Trash. —
userId string yes — path The user's email address. The special value `me` can be used to indicate the authenticated user. —

https://www.googleapis.com/auth/gmail.modify least privilege

2 scopes
  • https://mail.google.com/
  • https://www.googleapis.com/auth/gmail.modify

grr gmail users threads untrash
grr gmail users threads untrash --id <id> --user-id me --body-file ./body.json