This document explains how to delegate and collaborate on email using the
Gmail API.

A Gmail user can grant mailbox access to one or more users in the same
Google Workspace organization. The user granting access is the *delegator* ,
and the user receiving access is the *delegate*.

Delegates can read, send, and delete messages in the delegator's account. They
can also view and add contacts. When a delegate sends a message from the
delegator's account, the delegate's email address appears. For more information,
see [Delegate \& collaborate
on email](https://support.google.com/mail/answer/138350).

Google Workspace organizations can use the
[`settings.delegates`](https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.settings.delegates)
resource to manage delegates within Gmail accounts in their
organization. This requires a [service
account](https://developers.google.com/identity/protocols/oauth2/service-account) granted
[domain-wide
authority](https://developers.google.com/identity/protocols/oauth2/service-account#delegatingauthority).

You must refer to a delegate user by their primary email address, not an email
alias. Gmail limits the number of delegates for each user in a
Google Workspace organization to 25 delegates.

The
[`settings.delegates`](https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.settings.delegates)
resource contains more information on how to
[create](https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.settings.delegates/create),
[list](https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.settings.delegates/list),
[get](https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.settings.delegates/get), or
[delete](https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.settings.delegates/delete)
delegates.

The `settings.delegates` resource includes a
[`VerificationStatus`](https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.settings.delegates#verificationstatus)
object to indicate whether Gmail verified ownership of an email
address for delegation. When you create a delegate using the
[`settings.delegates.create`](https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.settings.delegates/create)
method, Gmail sets the
[`verificationStatus`](https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.settings.delegates#Delegate.FIELDS.verification_status)
field to `accepted` without sending a verification email.