Gmail API Documentation
This is the complete API documentation for connecting to the Gmail API using MindCloud's Universal API. If you are new to MindCloud, start with the Introduction to see how one API can sit in front of many different apps.
MindCloud is an integration company that offers one normalized API to access 3,100+ apps from a single place. It cleans up provider-specific quirks, keeps requests and responses consistent, and centralizes authentication so you do not need to manage separate flows for every app. Browse other apps.
Meet Gmail: Send email, organize inboxes, search messages, and collaborate faster. Keep reading to get started.
Quickstart
Before you run your first Gmail request, you need three things:
- A MindCloud account — sign in or create an account at MindCloud.
- A MindCloud API Key — create one in API Keys. Keep it on your server.
- At least one Gmail connection — create or choose one in Connections. Note its
connectionId.
Every Gmail action uses the same URL pattern:
https://connect.mindcloud.co/v1/universal/gmail/latest/actions/{actionSlug}You need a MindCloud API Key and a Gmail connection. Then call an action such as Get Draft:
curl --request GET \
--url "https://connect.mindcloud.co/v1/universal/gmail/latest/actions/get-draft" \
--header "Authorization: Bearer $MINDCLOUD_API_KEY" \
--get \
--data-urlencode "connectionId=$CONNECTION_ID"Every response comes back in the same envelope, with your rows in a data array:
{
"success": true,
"data": [
{ "id": "1042", "name": "Ava" }
],
"meta": {}
}After your first request works, use Shape your requests to control arguments, pagination, filtering, fields, and errors.
Authentication
Authentication has two layers. Your MindCloud API Key authenticates the request to MindCloud, sent as a Bearer token in the Authorization header. The connectionId selects the connected Gmail account that should run the action. MindCloud stores and refreshes the Gmail credentials behind that connection, so you never send provider tokens with your requests.
Pass connectionId in the query string for GET and DELETE actions, and in the JSON body for POST, PUT, and PATCH actions. Keep your MindCloud API Key on your server; do not ship it in browser code, mobile apps, public repositories, or logs.
Gmail actions
All 33 published actions for this Gmail version. Each page documents the endpoint, arguments, and response controls.
- PUTBatch Modify Emails
- POSTCreate Draft
- POSTCreate Label
- DELETEDelete Draft
- DELETEDelete Label
- GETGet Draft
- GETGet Email
- GETGet Email Attachment
- GETGet Filter
- GETGet Label
- GETGet Profile
- GETGet Thread
- GETGet Vacation Settings
- POSTImport Email
- POSTInsert Email
- GETList Drafts
- GETList Emails
- GETList Filters
- GETList Labels
- GETList Threads
- PUTModify Email Labels
- PUTModify Thread Labels
- PUTPatch Label
- POSTSend Draft
- POSTSend Email
- POSTStart Mailbox Watch (Action)
- PUTStop Mailbox Watch
- PUTTrash Email
- PUTTrash Thread
- PUTUntrash Email
- PUTUntrash Thread
- PUTUpdate Draft
- PUTUpdate Label
Related apps
More Communication apps on the Universal API, behind the same REST shape. Or browse all apps.