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 draft with the DRAFT label. For more information, see Create and send draft
emails.
UsersResource.DraftsResource.DeleteRequest
Immediately and permanently deletes the specified draft. Does not simply trash it. For more information, see Create and send draft emails.
UsersResource.DraftsResource.GetRequest
Gets the specified draft. For more information, see Create and send draft emails.
UsersResource.DraftsResource.ListRequest
Lists the drafts in the user's mailbox. For more information, see Create and send draft emails.
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. For more
information, see Create and send draft
emails.
UsersResource.DraftsResource.UpdateMediaUpload
Update media upload which supports resumable upload.
UsersResource.DraftsResource.UpdateRequest
Replaces a draft's content. For more information, see Create and send draft emails.
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). For more information, see Synchronize clients with
Gmail.
UsersResource.LabelsResource
The "labels" collection of methods.
UsersResource.LabelsResource.CreateRequest
Creates a label. For more information, see Manage labels.
UsersResource.LabelsResource.DeleteRequest
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.
UsersResource.LabelsResource.GetRequest
Gets the specified label. For more information, see Manage labels.
UsersResource.LabelsResource.ListRequest
Lists all labels in the user's mailbox. For more information, see Manage labels.
UsersResource.LabelsResource.PatchRequest
Patch the specified label. For more information, see Manage labels.
UsersResource.LabelsResource.UpdateRequest
Updates the specified label. For more information, see Manage labels.
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 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-wide
delegation
authority to
impersonate users with the https://www.googleapis.com/auth/gmail.modify.restricted scope.
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. Note that the maximum size of the message is 150 MB.
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. For more information, see Create and send email
messages.
UsersResource.MessagesResource.ListRequest
Lists the messages in the user's mailbox. For more information, see List Gmail messages.
UsersResource.MessagesResource.ModifyRequest
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
delegation
authority to
impersonate users with the https://www.googleapis.com/auth/gmail.modify.restricted scope.
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 more
information, see Create and send email
messages.
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. For
administrators managing identities and keypairs for users in their organization, requests
require authorization with a service
account that has
domain-wide delegation
authority
to impersonate users with the https://www.googleapis.com/auth/gmail.settings.basic scope. For
users managing their own identities and keypairs, requests require hardware key
encryption turned on and configured.
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. For
administrators managing identities and keypairs for users in their organization, requests
require authorization with a service
account that has
domain-wide delegation
authority
to impersonate users with the https://www.googleapis.com/auth/gmail.settings.basic scope. For
users managing their own identities and keypairs, requests require hardware key
encryption turned on and configured.
UsersResource.SettingsResource.CseResource.IdentitiesResource.GetRequest
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 delegation
authority
to impersonate users with the https://www.googleapis.com/auth/gmail.settings.basic scope. For
users managing their own identities and keypairs, requests require hardware key
encryption turned on and configured.
UsersResource.SettingsResource.CseResource.IdentitiesResource.ListRequest
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-wide delegation
authority
to impersonate users with the https://www.googleapis.com/auth/gmail.settings.basic scope. For
users managing their own identities and keypairs, requests require hardware key
encryption turned on and configured.
UsersResource.SettingsResource.CseResource.IdentitiesResource.PatchRequest
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, requests require authorization with a service
account that has
domain-wide delegation
authority
to impersonate users with the https://www.googleapis.com/auth/gmail.settings.basic scope. For
users managing their own identities and keypairs, requests require hardware key
encryption turned on and configured.
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. For administrators managing identities and keypairs for
users in their organization, requests require authorization with a service
account that has
domain-wide delegation
authority
to impersonate users with the https://www.googleapis.com/auth/gmail.settings.basic scope. For
users managing their own identities and keypairs, requests require hardware key
encryption turned on and configured.
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. For administrators managing identities and keypairs
for users in their organization, requests require authorization with a service
account that has
domain-wide delegation
authority
to impersonate users with the https://www.googleapis.com/auth/gmail.settings.basic scope. For
users managing their own identities and keypairs, requests require hardware key
encryption turned on and configured.
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. For administrators managing
identities and keypairs for users in their organization, requests require authorization with a
service account that
has domain-wide delegation
authority
to impersonate users with the https://www.googleapis.com/auth/gmail.settings.basic scope. For
users managing their own identities and keypairs, requests require hardware key
encryption turned on and configured.
UsersResource.SettingsResource.CseResource.KeypairsResource.GetRequest
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
authority
to impersonate users with the https://www.googleapis.com/auth/gmail.settings.basic scope. For
users managing their own identities and keypairs, requests require hardware key
encryption turned on and configured.
UsersResource.SettingsResource.CseResource.KeypairsResource.ListRequest
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 delegation
authority
to impersonate users with the https://www.googleapis.com/auth/gmail.settings.basic scope. For
users managing their own identities and keypairs, requests require hardware key
encryption turned on and configured.
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. For administrators managing identities and keypairs for users in
their organization, requests require authorization with a service
account that has
domain-wide delegation
authority
to impersonate users with the https://www.googleapis.com/auth/gmail.settings.basic scope. For
users managing their own identities and keypairs, requests require hardware key
encryption turned on and configured.
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. For more information, see Manage
delegates. Gmail
imposes limitations on the number of delegates and delegators each user in a Google Workspace
organization can have. These limits depend on your organization, but in general each user can have
up to 25 delegates and up to 10 delegators. A delegate user must be referred to by their primary
email address, and not an email alias. When a new delegate is created, there may be up to a one
minute delay before the new delegate is available for use. This method is only available to service
account clients that have been delegated domain-wide authority.
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. 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 that have been delegated domain-wide authority.
UsersResource.SettingsResource.DelegatesResource.GetRequest
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 that have been delegated domain-wide authority.
UsersResource.SettingsResource.DelegatesResource.ListRequest
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.
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. For more information, see Manage Gmail filters.
UsersResource.SettingsResource.FiltersResource.DeleteRequest
Immediately and permanently deletes the specified filter. For more information, see Manage Gmail filters.
UsersResource.SettingsResource.FiltersResource.GetRequest
Gets a filter. For more information, see Manage Gmail filters.
UsersResource.SettingsResource.FiltersResource.ListRequest
Lists the message filters of a Gmail user. For more information, see Manage Gmail filters.
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. For more information, see Manage email
forwarding. 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. For more information, see Manage email forwarding. 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. For more information, see Manage email forwarding.
UsersResource.SettingsResource.ForwardingAddressesResource.ListRequest
Lists the forwarding addresses for the specified account. For more information, see Manage email forwarding.
UsersResource.SettingsResource.GetAutoForwardingRequest
Gets the auto-forwarding setting for the specified account. For more information, see Manage email forwarding.
UsersResource.SettingsResource.GetImapRequest
Gets IMAP settings. For more information, see Configure POP and IMAP settings with the Gmail API.
UsersResource.SettingsResource.GetLanguageRequest
Gets language settings. For more information, see Manage language settings.
UsersResource.SettingsResource.GetPopRequest
Gets POP settings. For more information, see Configure POP and IMAP settings with the Gmail API.
UsersResource.SettingsResource.GetVacationRequest
Gets vacation responder settings. For more information, see Manage vacation settings with the Gmail API.
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. For more information, see Manage aliases and signatures with the
Gmail API.
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. For more information, see Manage aliases and signatures with the Gmail API. 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. For more information, see Manage aliases and signatures with the Gmail API.
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. For more information, see Manage aliases and signatures with the Gmail API.
UsersResource.SettingsResource.SendAsResource.PatchRequest
Patch the specified send-as alias. For more information, see Manage aliases and signatures with the Gmail API.
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. For more information, see Manage S/MIME certificates with the Gmail API.
UsersResource.SettingsResource.SendAsResource.SmimeInfoResource.GetRequest
Gets the specified S/MIME config for the specified send-as alias. For more information, see Manage S/MIME certificates with the Gmail API.
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. For more information, see Manage S/MIME certificates with the
Gmail API.
UsersResource.SettingsResource.SendAsResource.SmimeInfoResource.ListRequest
Lists S/MIME configs for the specified send-as alias. For more information, see Manage S/MIME certificates with the Gmail API.
UsersResource.SettingsResource.SendAsResource.SmimeInfoResource.SetDefaultRequest
Sets the default S/MIME config for the specified send-as alias. For more information, see Manage S/MIME certificates with the Gmail API.
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. For more information, see Manage aliases and signatures with the Gmail API. 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. For more information, see Manage aliases and signatures with the Gmail
API. 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. For more information, see Manage email forwarding. This method is only available to service account clients that have been delegated domain-wide authority.
UsersResource.SettingsResource.UpdateImapRequest
Updates IMAP settings. For more information, see Configure POP and IMAP settings with the Gmail API.
UsersResource.SettingsResource.UpdateLanguageRequest
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 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. For more information, see Configure POP and IMAP settings with the Gmail API.
UsersResource.SettingsResource.UpdateVacationRequest
Updates vacation responder settings. For more information, see Manage vacation settings with the Gmail API.
UsersResource.StopRequest
Turn off push notification delivery for the given user mailbox. For more information, see Configure push notifications in Gmail API.
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. For more information, see
Manage threads.
UsersResource.ThreadsResource.GetRequest
Gets the specified thread. For more information, see Manage threads.
UsersResource.ThreadsResource.ListRequest
Lists the threads in the user's mailbox. For more information, see Manage threads.
UsersResource.ThreadsResource.ModifyRequest
Modifies the labels applied to the thread. This applies to all messages in the thread. For more information, see Manage threads.
UsersResource.ThreadsResource.TrashRequest
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.
UsersResource.ThreadsResource.UntrashRequest
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.
UsersResource.WatchRequest
Set up or update a push notification watch on the given user mailbox. For more information, see Configure push notifications in Gmail API.
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.