Module api

Source

Structs§

AutoForwarding
Auto-forwarding settings for an account.
BatchDeleteMessagesRequest
There is no detailed description.
BatchModifyMessagesRequest
There is no detailed description.
CseIdentity
The client-side encryption (CSE) configuration for the email address of an authenticated user. Gmail uses CSE configurations to save drafts of client-side encrypted email messages, and to sign and send encrypted email messages.
CseKeyPair
A client-side encryption S/MIME key pair, which is comprised of a public key, its certificate chain, and metadata for its paired private key. Gmail uses the key pair to complete the following tasks: - Sign outgoing client-side encrypted messages. - Save and reopen drafts of client-side encrypted messages. - Save and reopen sent messages. - Decrypt incoming or archived S/MIME messages.
CsePrivateKeyMetadata
Metadata for a private key instance.
Delegate
Settings for a delegate. Delegates can read, send, and delete messages, as well as view and add contacts, for the delegator’s account. See “Set up mail delegation” for more information about delegates.
DisableCseKeyPairRequest
Requests to turn off a client-side encryption key pair.
Draft
A draft email in the user’s mailbox.
EnableCseKeyPairRequest
Requests to turn on a client-side encryption key pair.
Filter
Resource definition for Gmail filters. Filters apply to specific messages instead of an entire email thread.
FilterAction
A set of actions to perform on a message.
FilterCriteria
Message matching criteria.
ForwardingAddress
Settings for a forwarding address.
Gmail
Central instance to access all Gmail related resource activities
HardwareKeyMetadata
Metadata for hardware keys.
History
A record of a change to the user’s mailbox. Each history change may affect multiple messages in multiple ways.
HistoryLabelAdded
There is no detailed description.
HistoryLabelRemoved
There is no detailed description.
HistoryMessageAdded
There is no detailed description.
HistoryMessageDeleted
There is no detailed description.
ImapSettings
IMAP settings for an account.
KaclsKeyMetadata
Metadata for private keys managed by an external key access control list service. For details about managing key access, see Google Workspace CSE API Reference.
Label
Labels are used to categorize messages and threads within the user’s mailbox. The maximum number of labels supported for a user’s mailbox is 10,000.
LabelColor
There is no detailed description.
LanguageSettings
Language settings for an account. These settings correspond to the “Language settings” feature in the web interface.
ListCseIdentitiesResponse
There is no detailed description.
ListCseKeyPairsResponse
There is no detailed description.
ListDelegatesResponse
Response for the ListDelegates method.
ListDraftsResponse
There is no detailed description.
ListFiltersResponse
Response for the ListFilters method.
ListForwardingAddressesResponse
Response for the ListForwardingAddresses method.
ListHistoryResponse
There is no detailed description.
ListLabelsResponse
There is no detailed description.
ListMessagesResponse
There is no detailed description.
ListSendAsResponse
Response for the ListSendAs method.
ListSmimeInfoResponse
There is no detailed description.
ListThreadsResponse
There is no detailed description.
Message
An email message.
MessagePart
A single MIME message part.
MessagePartBody
The body of a single MIME message part.
MessagePartHeader
There is no detailed description.
ModifyMessageRequest
There is no detailed description.
ModifyThreadRequest
There is no detailed description.
ObliterateCseKeyPairRequest
Request to obliterate a CSE key pair.
PopSettings
POP settings for an account.
Profile
Profile for a Gmail user.
SendAs
Settings associated with a send-as alias, which can be either the primary login address associated with the account or a custom “from” address. Send-as aliases correspond to the “Send Mail As” feature in the web interface.
SignAndEncryptKeyPairs
The configuration of a CSE identity that uses different key pairs for signing and encryption.
SmimeInfo
An S/MIME email config.
SmtpMsa
Configuration for communication with an SMTP service.
Thread
A collection of messages representing a conversation.
UserDraftCreateCall
Creates a new draft with the DRAFT label.
UserDraftDeleteCall
Immediately and permanently deletes the specified draft. Does not simply trash it.
UserDraftGetCall
Gets the specified draft.
UserDraftListCall
Lists the drafts in the user’s mailbox.
UserDraftSendCall
Sends the specified, existing draft to the recipients in the To, Cc, and Bcc headers.
UserDraftUpdateCall
Replaces a draft’s content.
UserGetProfileCall
Gets the current user’s Gmail profile.
UserHistoryListCall
Lists the history of all changes to the given mailbox. History results are returned in chronological order (increasing historyId).
UserLabelCreateCall
Creates a new label.
UserLabelDeleteCall
Immediately and permanently deletes the specified label and removes it from any messages and threads that it is applied to.
UserLabelGetCall
Gets the specified label.
UserLabelListCall
Lists all labels in the user’s mailbox.
UserLabelPatchCall
Patch the specified label.
UserLabelUpdateCall
Updates the specified label.
UserMessageAttachmentGetCall
Gets the specified message attachment.
UserMessageBatchDeleteCall
Deletes many messages by message ID. Provides no guarantees that messages were not already deleted or even existed at all.
UserMessageBatchModifyCall
Modifies the labels on the specified messages.
UserMessageDeleteCall
Immediately and permanently deletes the specified message. This operation cannot be undone. Prefer messages.trash instead.
UserMessageGetCall
Gets the specified message.
UserMessageImportCall
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.
UserMessageInsertCall
Directly inserts a message into only this user’s mailbox similar to IMAP APPEND, bypassing most scanning and classification. Does not send a message.
UserMessageListCall
Lists the messages in the user’s mailbox.
UserMessageModifyCall
Modifies the labels on the specified message.
UserMessageSendCall
Sends the specified message to the recipients in the To, Cc, and Bcc headers. For example usage, see Sending email.
UserMessageTrashCall
Moves the specified message to the trash.
UserMessageUntrashCall
Removes the specified message from the trash.
UserMethods
A builder providing access to all methods supported on user resources. It is not used directly, but through the Gmail hub.
UserSettingCseIdentityCreateCall
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.
UserSettingCseIdentityDeleteCall
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.
UserSettingCseIdentityGetCall
Retrieves a client-side encryption identity configuration.
UserSettingCseIdentityListCall
Lists the client-side encrypted identities for an authenticated user.
UserSettingCseIdentityPatchCall
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.
UserSettingCseKeypairCreateCall
Creates and uploads a client-side encryption S/MIME public key certificate chain and private key metadata for the authenticated user.
UserSettingCseKeypairDisableCall
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.
UserSettingCseKeypairEnableCall
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.
UserSettingCseKeypairGetCall
Retrieves an existing client-side encryption key pair.
UserSettingCseKeypairListCall
Lists client-side encryption key pairs for an authenticated user.
UserSettingCseKeypairObliterateCall
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.
UserSettingDelegateCreateCall
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. 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. Note that a delegate user must be referred to by their primary email address, and not an email alias. Also note that 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.
UserSettingDelegateDeleteCall
Removes the specified delegate (which can be of any verification status), and revokes any verification that may have been required for using it. Note that 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.
UserSettingDelegateGetCall
Gets the specified delegate. Note that 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.
UserSettingDelegateListCall
Lists the delegates for the specified account. This method is only available to service account clients that have been delegated domain-wide authority.
UserSettingFilterCreateCall
Creates a filter. Note: you can only create a maximum of 1,000 filters.
UserSettingFilterDeleteCall
Immediately and permanently deletes the specified filter.
UserSettingFilterGetCall
Gets a filter.
UserSettingFilterListCall
Lists the message filters of a Gmail user.
UserSettingForwardingAddressCreateCall
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. This method is only available to service account clients that have been delegated domain-wide authority.
UserSettingForwardingAddressDeleteCall
Deletes the specified forwarding address and revokes any verification that may have been required. This method is only available to service account clients that have been delegated domain-wide authority.
UserSettingForwardingAddressGetCall
Gets the specified forwarding address.
UserSettingForwardingAddressListCall
Lists the forwarding addresses for the specified account.
UserSettingGetAutoForwardingCall
Gets the auto-forwarding setting for the specified account.
UserSettingGetImapCall
Gets IMAP settings.
UserSettingGetLanguageCall
Gets language settings.
UserSettingGetPopCall
Gets POP settings.
UserSettingGetVacationCall
Gets vacation responder settings.
UserSettingSendACreateCall
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. This method is only available to service account clients that have been delegated domain-wide authority.
UserSettingSendADeleteCall
Deletes the specified send-as alias. Revokes any verification that may have been required for using it. This method is only available to service account clients that have been delegated domain-wide authority.
UserSettingSendAGetCall
Gets the specified send-as alias. Fails with an HTTP 404 error if the specified address is not a member of the collection.
UserSettingSendAListCall
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.
UserSettingSendAPatchCall
Patch the specified send-as alias.
UserSettingSendASmimeInfoDeleteCall
Deletes the specified S/MIME config for the specified send-as alias.
UserSettingSendASmimeInfoGetCall
Gets the specified S/MIME config for the specified send-as alias.
UserSettingSendASmimeInfoInsertCall
Insert (upload) the given S/MIME config for the specified send-as alias. Note that pkcs12 format is required for the key.
UserSettingSendASmimeInfoListCall
Lists S/MIME configs for the specified send-as alias.
UserSettingSendASmimeInfoSetDefaultCall
Sets the default S/MIME config for the specified send-as alias.
UserSettingSendAUpdateCall
Updates a send-as alias. If a signature is provided, Gmail will sanitize the HTML before saving it with the alias. Addresses other than the primary address for the account can only be updated by service account clients that have been delegated domain-wide authority.
UserSettingSendAVerifyCall
Sends a verification email to the specified send-as alias address. The verification status must be pending. This method is only available to service account clients that have been delegated domain-wide authority.
UserSettingUpdateAutoForwardingCall
Updates the auto-forwarding setting for the specified account. A verified forwarding address must be specified when auto-forwarding is enabled. This method is only available to service account clients that have been delegated domain-wide authority.
UserSettingUpdateImapCall
Updates IMAP settings.
UserSettingUpdateLanguageCall
Updates 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.
UserSettingUpdatePopCall
Updates POP settings.
UserSettingUpdateVacationCall
Updates vacation responder settings.
UserStopCall
Stop receiving push notifications for the given user mailbox.
UserThreadDeleteCall
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.
UserThreadGetCall
Gets the specified thread.
UserThreadListCall
Lists the threads in the user’s mailbox.
UserThreadModifyCall
Modifies the labels applied to the thread. This applies to all messages in the thread.
UserThreadTrashCall
Moves the specified thread to the trash. Any messages that belong to the thread are also moved to the trash.
UserThreadUntrashCall
Removes the specified thread from the trash. Any messages that belong to the thread are also removed from the trash.
UserWatchCall
Set up or update a push notification watch on the given user mailbox.
VacationSettings
Vacation auto-reply settings for an account. These settings correspond to the “Vacation responder” feature in the web interface.
WatchRequest
Set up or update a new push notification watch on this user’s mailbox.
WatchResponse
Push notification watch response.

Enums§

Scope
Identifies the an OAuth2 authorization scope. A scope is needed when requesting an authorization token.