googleapis.com

The Gmail API lets you view and manage Gmail mailbox data like threads, messages, and labels.

🔑 oauth2 79 endpoints analyticsmedia
📄 Docs 📋 OpenAPI spec 🔬 Try in Swagger UI

SDKs by language (10 total)

mcp-toolbox-sdk-python ✓ Official
pip install mcp-toolbox-sdk-python
python-storage ✓ Official
pip install python-storage
python-aiplatform ✓ Official
pip install python-aiplatform
python-genai ✓ Official
pip install python-genai
js-genai ✓ Official
npm install js-genai
go-genai ✓ Official
go get github.com/googleapis/go-genai
sdk-platform-java ✓ Official
# Maven: see https://github.com/googleapis/sdk-platform-java
java-genai ✓ Official
# Maven: see https://github.com/googleapis/java-genai
dotnet-genai ✓ Official
# See https://github.com/googleapis/dotnet-genai
gax-java ✓ Official
# See https://github.com/googleapis/gax-java
curl examples
Lists the drafts in the user's mailbox.
curl \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  https://gmail.googleapis.com/gmail/v1/users/{userId}/drafts
Lists all labels in the user's mailbox.
curl \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  https://gmail.googleapis.com/gmail/v1/users/{userId}/labels
Lists the history of all changes to the given mailbox. History results are re…
curl \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  https://gmail.googleapis.com/gmail/v1/users/{userId}/history
Endpoints (79 total)
GET
/gmail/v1/users/{userId}/drafts
Lists the drafts in the user's mailbox.
GET
/gmail/v1/users/{userId}/labels
Lists all labels in the user's mailbox.
GET
/gmail/v1/users/{userId}/history
Lists the history of all changes to the given mailbox. History results are re…
GET
/gmail/v1/users/{userId}/profile
Gets the current user's Gmail profile.
GET
/gmail/v1/users/{userId}/threads
Lists the threads in the user's mailbox.
GET
/gmail/v1/users/{userId}/messages
Lists the messages in the user's mailbox.
GET
/gmail/v1/users/{userId}/drafts/{id}
Gets the specified draft.
GET
/gmail/v1/users/{userId}/labels/{id}
Gets the specified label.
GET
/gmail/v1/users/{userId}/settings/pop
Gets POP settings.
GET
/gmail/v1/users/{userId}/threads/{id}
Gets the specified thread.
GET
/gmail/v1/users/{userId}/messages/{id}
Gets the specified message.
GET
/gmail/v1/users/{userId}/settings/imap
Gets IMAP settings.
At a glance
Total SDKs10
Languages6
Endpoints79
Authoauth2
Categories2
https://gmail.googleapis.com