---
name: GMail
version: 1.0.0
description: "Google Gmail API access for AI agents. Read, send, and manage emails with OAuth token passthrough. Supports messages, labels, threads, and drafts."
homepage: https://google-gmail-beyazl7hsq-uc.a.run.app
metadata: {"seren":{"category":"integration","publisher_slug":"gmail","api_base":"https://api.serendb.com"}}
---

# GMail

Google Gmail API access for AI agents. Read, send, and manage emails with OAuth token passthrough. Supports messages, labels, threads, and drafts.

## API Endpoints

### GET `/health`

Health check endpoint

**Example:**

```bash
curl -X GET https://api.serendb.com/publishers/gmail/health \
  -H "Authorization: Bearer $SEREN_API_KEY"
```

### GET `/messages`

List messages in mailbox with optional search query

**Example:**

```bash
curl -X GET https://api.serendb.com/publishers/gmail/messages \
  -H "Authorization: Bearer $SEREN_API_KEY"
```

### GET `/messages/{message_id}`

Get a specific message by ID

**Example:**

```bash
curl -X GET https://api.serendb.com/publishers/gmail/messages/{message_id} \
  -H "Authorization: Bearer $SEREN_API_KEY"
```

### POST `/messages/send`

Send a new email message

**Example:**

```bash
curl -X POST https://api.serendb.com/publishers/gmail/messages/send \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### DELETE `/messages/{message_id}`

Permanently delete a message

**Example:**

```bash
curl -X DELETE https://api.serendb.com/publishers/gmail/messages/{message_id} \
  -H "Authorization: Bearer $SEREN_API_KEY"
```

### POST `/messages/{message_id}/trash`

Move message to trash

**Example:**

```bash
curl -X POST https://api.serendb.com/publishers/gmail/messages/{message_id}/trash \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### POST `/messages/{message_id}/modify`

Add or remove labels from a message

**Example:**

```bash
curl -X POST https://api.serendb.com/publishers/gmail/messages/{message_id}/modify \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### GET `/labels`

List all labels

**Example:**

```bash
curl -X GET https://api.serendb.com/publishers/gmail/labels \
  -H "Authorization: Bearer $SEREN_API_KEY"
```

### GET `/labels/{label_id}`

Get a specific label

**Example:**

```bash
curl -X GET https://api.serendb.com/publishers/gmail/labels/{label_id} \
  -H "Authorization: Bearer $SEREN_API_KEY"
```

### POST `/labels`

Create a new label

**Example:**

```bash
curl -X POST https://api.serendb.com/publishers/gmail/labels \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### DELETE `/labels/{label_id}`

Delete a label

**Example:**

```bash
curl -X DELETE https://api.serendb.com/publishers/gmail/labels/{label_id} \
  -H "Authorization: Bearer $SEREN_API_KEY"
```

### GET `/threads`

List email threads

**Example:**

```bash
curl -X GET https://api.serendb.com/publishers/gmail/threads \
  -H "Authorization: Bearer $SEREN_API_KEY"
```

### GET `/threads/{thread_id}`

Get a specific thread with all messages

**Example:**

```bash
curl -X GET https://api.serendb.com/publishers/gmail/threads/{thread_id} \
  -H "Authorization: Bearer $SEREN_API_KEY"
```

### POST `/threads/{thread_id}/trash`

Move thread to trash

**Example:**

```bash
curl -X POST https://api.serendb.com/publishers/gmail/threads/{thread_id}/trash \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### GET `/drafts`

List draft messages

**Example:**

```bash
curl -X GET https://api.serendb.com/publishers/gmail/drafts \
  -H "Authorization: Bearer $SEREN_API_KEY"
```

### POST `/drafts`

Create a new draft

**Example:**

```bash
curl -X POST https://api.serendb.com/publishers/gmail/drafts \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### POST `/drafts/{draft_id}/send`

Send an existing draft

**Example:**

```bash
curl -X POST https://api.serendb.com/publishers/gmail/drafts/{draft_id}/send \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

## MCP Tools

This API publisher also supports MCP (Model Context Protocol) access. Each API endpoint is available as an MCP tool.

### Available Tools

- `get_health`: Health check endpoint
- `get_messages`: List messages in mailbox with optional search query
- `get_messages_by_message_id`: Get a specific message by ID
- `post_messages_send`: Send a new email message
- `delete_messages_by_message_id`: Permanently delete a message
- `post_messages_by_message_id_trash`: Move message to trash
- `post_messages_by_message_id_modify`: Add or remove labels from a message
- `get_labels`: List all labels
- `get_labels_by_label_id`: Get a specific label
- `post_labels`: Create a new label
- `delete_labels_by_label_id`: Delete a label
- `get_threads`: List email threads
- `get_threads_by_thread_id`: Get a specific thread with all messages
- `post_threads_by_thread_id_trash`: Move thread to trash
- `get_drafts`: List draft messages
- `post_drafts`: Create a new draft
- `post_drafts_by_draft_id_send`: Send an existing draft

### Introspection

```bash
# List tools
curl https://api.serendb.com/publishers/gmail/_mcp/tools \
  -H "Authorization: Bearer $SEREN_API_KEY"

# Call a tool
curl -X POST https://api.serendb.com/publishers/gmail/_mcp/tools/{tool_name} \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"body": {"key": "value"}}'
```

## Pricing

**Pricing Model:** per_request

- Price per request: $0.00015000

**Minimum charge:** $0.00010000

---

## Need Help?

- Seren Docs: https://docs.serendb.com
- Publisher: Google Gmail API access for AI agents. Read, send, and manage emails with OAuth token passthrough. Supports messages, labels, threads, and drafts.
