Namespace Google.Apis.Gmail.v1 | Google.Apis.Gmail.v1
Show / Hide Table of Contents

Namespace Google.Apis.Gmail.v1

Classes

GmailBaseServiceRequest<TResponse>

A base abstract class for Gmail requests.

GmailService

The Gmail Service.

GmailService.Scope

Available OAuth 2.0 scopes for use with the Gmail API.

GmailService.ScopeConstants

Available OAuth 2.0 scope constants for use with the Gmail API.

UsersResource

The "users" collection of methods.

UsersResource.DraftsResource

The "drafts" collection of methods.

UsersResource.DraftsResource.CreateMediaUpload

Create media upload which supports resumable upload.

UsersResource.DraftsResource.CreateRequest

Creates a new draft with the DRAFT label.

UsersResource.DraftsResource.DeleteRequest

Immediately and permanently deletes the specified draft. Does not simply trash it.

UsersResource.DraftsResource.GetRequest

Gets the specified draft.

UsersResource.DraftsResource.ListRequest

Lists the drafts in the user's mailbox.

UsersResource.DraftsResource.SendMediaUpload

Send media upload which supports resumable upload.

UsersResource.DraftsResource.SendRequest

Sends the specified, existing draft to the recipients in the To, Cc, and Bcc headers.

UsersResource.DraftsResource.UpdateMediaUpload

Update media upload which supports resumable upload.

UsersResource.DraftsResource.UpdateRequest

Replaces a draft's content.

UsersResource.GetProfileRequest

Gets the current user's Gmail profile.

UsersResource.HistoryResource

The "history" collection of methods.

UsersResource.HistoryResource.ListRequest

Lists the history of all changes to the given mailbox. History results are returned in chronological order (increasing historyId).

UsersResource.LabelsResource

The "labels" collection of methods.

UsersResource.LabelsResource.CreateRequest

Creates a new label.

UsersResource.LabelsResource.DeleteRequest

Immediately and permanently deletes the specified label and removes it from any messages and threads that it is applied to.

UsersResource.LabelsResource.GetRequest

Gets the specified label.

UsersResource.LabelsResource.ListRequest

Lists all labels in the user's mailbox.

UsersResource.LabelsResource.Request

the specified label.

UsersResource.LabelsResource.UpdateRequest

Updates the specified label.

UsersResource.MessagesResource

The "messages" collection of methods.

UsersResource.MessagesResource.AttachmentsResource

The "attachments" collection of methods.

UsersResource.MessagesResource.AttachmentsResource.GetRequest

Gets the specified message attachment.

UsersResource.MessagesResource.BatchDeleteRequest

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

UsersResource.MessagesResource.BatchModifyRequest

Modifies the labels on the specified messages.

UsersResource.MessagesResource.DeleteRequest

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

UsersResource.MessagesResource.GetRequest

Gets the specified message.

UsersResource.MessagesResource.ImportMediaUpload

Import media upload which supports resumable upload.

UsersResource.MessagesResource.ImportRequest

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.

UsersResource.MessagesResource.InsertMediaUpload

Insert media upload which supports resumable upload.

UsersResource.MessagesResource.InsertRequest

Directly inserts a message into only this user's mailbox similar to IMAP APPEND, bypassing most scanning and classification. Does not send a message.

UsersResource.MessagesResource.ListRequest

Lists the messages in the user's mailbox.

UsersResource.MessagesResource.ModifyRequest

Modifies the labels on the specified message.

UsersResource.MessagesResource.SendMediaUpload

Send media upload which supports resumable upload.

UsersResource.MessagesResource.SendRequest

Sends the specified message to the recipients in the To, Cc, and Bcc headers. For example usage, see Sending email.

UsersResource.MessagesResource.TrashRequest

Moves the specified message to the trash.

UsersResource.MessagesResource.UntrashRequest

Removes the specified message from the trash.

UsersResource.SettingsResource

The "settings" collection of methods.

UsersResource.SettingsResource.CseResource

The "cse" collection of methods.

UsersResource.SettingsResource.CseResource.IdentitiesResource

The "identities" collection of methods.

UsersResource.SettingsResource.CseResource.IdentitiesResource.CreateRequest

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.

UsersResource.SettingsResource.CseResource.IdentitiesResource.DeleteRequest

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.

UsersResource.SettingsResource.CseResource.IdentitiesResource.GetRequest

Retrieves a client-side encryption identity configuration.

UsersResource.SettingsResource.CseResource.IdentitiesResource.ListRequest

Lists the client-side encrypted identities for an authenticated user.

UsersResource.SettingsResource.CseResource.IdentitiesResource.Request

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.

UsersResource.SettingsResource.CseResource.KeypairsResource

The "keypairs" collection of methods.

UsersResource.SettingsResource.CseResource.KeypairsResource.CreateRequest

Creates and uploads a client-side encryption S/MIME public key certificate chain and private key metadata for the authenticated user.

UsersResource.SettingsResource.CseResource.KeypairsResource.DisableRequest

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.

UsersResource.SettingsResource.CseResource.KeypairsResource.EnableRequest

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.

UsersResource.SettingsResource.CseResource.KeypairsResource.GetRequest

Retrieves an existing client-side encryption key pair.

UsersResource.SettingsResource.CseResource.KeypairsResource.ListRequest

Lists client-side encryption key pairs for an authenticated user.

UsersResource.SettingsResource.CseResource.KeypairsResource.ObliterateRequest

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.

UsersResource.SettingsResource.DelegatesResource

The "delegates" collection of methods.

UsersResource.SettingsResource.DelegatesResource.CreateRequest

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.

UsersResource.SettingsResource.DelegatesResource.DeleteRequest

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.

UsersResource.SettingsResource.DelegatesResource.GetRequest

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.

UsersResource.SettingsResource.DelegatesResource.ListRequest

Lists the delegates for the specified account. This method is only available to service account clients that have been delegated domain-wide authority.

UsersResource.SettingsResource.FiltersResource

The "filters" collection of methods.

UsersResource.SettingsResource.FiltersResource.CreateRequest

Creates a filter. Note: you can only create a maximum of 1,000 filters.

UsersResource.SettingsResource.FiltersResource.DeleteRequest

Immediately and permanently deletes the specified filter.

UsersResource.SettingsResource.FiltersResource.GetRequest

Gets a filter.

UsersResource.SettingsResource.FiltersResource.ListRequest

Lists the message filters of a Gmail user.

UsersResource.SettingsResource.ForwardingAddressesResource

The "forwardingAddresses" collection of methods.

UsersResource.SettingsResource.ForwardingAddressesResource.CreateRequest

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.

UsersResource.SettingsResource.ForwardingAddressesResource.DeleteRequest

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.

UsersResource.SettingsResource.ForwardingAddressesResource.GetRequest

Gets the specified forwarding address.

UsersResource.SettingsResource.ForwardingAddressesResource.ListRequest

Lists the forwarding addresses for the specified account.

UsersResource.SettingsResource.GetAutoForwardingRequest

Gets the auto-forwarding setting for the specified account.

UsersResource.SettingsResource.GetImapRequest

Gets IMAP settings.

UsersResource.SettingsResource.GetLanguageRequest

Gets language settings.

UsersResource.SettingsResource.GetPopRequest

Gets POP settings.

UsersResource.SettingsResource.GetVacationRequest

Gets vacation responder settings.

UsersResource.SettingsResource.SendAsResource

The "sendAs" collection of methods.

UsersResource.SettingsResource.SendAsResource.CreateRequest

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.

UsersResource.SettingsResource.SendAsResource.DeleteRequest

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.

UsersResource.SettingsResource.SendAsResource.GetRequest

Gets the specified send-as alias. Fails with an HTTP 404 error if the specified address is not a member of the collection.

UsersResource.SettingsResource.SendAsResource.ListRequest

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.

UsersResource.SettingsResource.SendAsResource.Request

the specified send-as alias.

UsersResource.SettingsResource.SendAsResource.SmimeInfoResource

The "smimeInfo" collection of methods.

UsersResource.SettingsResource.SendAsResource.SmimeInfoResource.DeleteRequest

Deletes the specified S/MIME config for the specified send-as alias.

UsersResource.SettingsResource.SendAsResource.SmimeInfoResource.GetRequest

Gets the specified S/MIME config for the specified send-as alias.

UsersResource.SettingsResource.SendAsResource.SmimeInfoResource.InsertRequest

Insert (upload) the given S/MIME config for the specified send-as alias. Note that pkcs12 format is required for the key.

UsersResource.SettingsResource.SendAsResource.SmimeInfoResource.ListRequest

Lists S/MIME configs for the specified send-as alias.

UsersResource.SettingsResource.SendAsResource.SmimeInfoResource.SetDefaultRequest

Sets the default S/MIME config for the specified send-as alias.

UsersResource.SettingsResource.SendAsResource.UpdateRequest

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.

UsersResource.SettingsResource.SendAsResource.VerifyRequest

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.

UsersResource.SettingsResource.UpdateAutoForwardingRequest

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.

UsersResource.SettingsResource.UpdateImapRequest

Updates IMAP settings.

UsersResource.SettingsResource.UpdateLanguageRequest

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.

UsersResource.SettingsResource.UpdatePopRequest

Updates POP settings.

UsersResource.SettingsResource.UpdateVacationRequest

Updates vacation responder settings.

UsersResource.StopRequest

Stop receiving push notifications for the given user mailbox.

UsersResource.ThreadsResource

The "threads" collection of methods.

UsersResource.ThreadsResource.DeleteRequest

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.

UsersResource.ThreadsResource.GetRequest

Gets the specified thread.

UsersResource.ThreadsResource.ListRequest

Lists the threads in the user's mailbox.

UsersResource.ThreadsResource.ModifyRequest

Modifies the labels applied to the thread. This applies to all messages in the thread.

UsersResource.ThreadsResource.TrashRequest

Moves the specified thread to the trash. Any messages that belong to the thread are also moved to the trash.

UsersResource.ThreadsResource.UntrashRequest

Removes the specified thread from the trash. Any messages that belong to the thread are also removed from the trash.

UsersResource.WatchRequest

Set up or update a push notification watch on the given user mailbox.

Enums

GmailBaseServiceRequest<TResponse>.AltEnum

Data format for response.

GmailBaseServiceRequest<TResponse>.XgafvEnum

V1 error format.

UsersResource.DraftsResource.CreateMediaUpload.AltEnum

Data format for response.

UsersResource.DraftsResource.CreateMediaUpload.XgafvEnum

V1 error format.

UsersResource.DraftsResource.GetRequest.FormatEnum

The format to return the draft in.

UsersResource.DraftsResource.SendMediaUpload.AltEnum

Data format for response.

UsersResource.DraftsResource.SendMediaUpload.XgafvEnum

V1 error format.

UsersResource.DraftsResource.UpdateMediaUpload.AltEnum

Data format for response.

UsersResource.DraftsResource.UpdateMediaUpload.XgafvEnum

V1 error format.

UsersResource.HistoryResource.ListRequest.HistoryTypesEnum

History types to be returned by the function

UsersResource.MessagesResource.GetRequest.FormatEnum

The format to return the message in.

UsersResource.MessagesResource.ImportMediaUpload.AltEnum

Data format for response.

UsersResource.MessagesResource.ImportMediaUpload.InternalDateSourceEnum

Source for Gmail's internal date of the message.

UsersResource.MessagesResource.ImportMediaUpload.XgafvEnum

V1 error format.

UsersResource.MessagesResource.ImportRequest.InternalDateSourceEnum

Source for Gmail's internal date of the message.

UsersResource.MessagesResource.InsertMediaUpload.AltEnum

Data format for response.

UsersResource.MessagesResource.InsertMediaUpload.InternalDateSourceEnum

Source for Gmail's internal date of the message.

UsersResource.MessagesResource.InsertMediaUpload.XgafvEnum

V1 error format.

UsersResource.MessagesResource.InsertRequest.InternalDateSourceEnum

Source for Gmail's internal date of the message.

UsersResource.MessagesResource.SendMediaUpload.AltEnum

Data format for response.

UsersResource.MessagesResource.SendMediaUpload.XgafvEnum

V1 error format.

UsersResource.ThreadsResource.GetRequest.FormatEnum

The format to return the messages in.

In this article
Back to top Generated by DocFX