API Overview

inbox.dog provides multiple ways to integrate with external systems and automate workflows.

Integration Options

Method Use Case Documentation
Webhooks Send email data to Zapier, Make, custom APIs Webhook Payloads →
MCP Server Connect ChatGPT, Claude Desktop, custom clients MCP Server →
REST API Programmatic access (coming soon) Internal endpoints

Webhooks

Send email data to external services when agents process emails.

How Webhooks Work

  1. Agent processes an email
  2. Agent executes webhook tool
  3. Payload sent to configured URL
  4. Your service receives email data

Webhook Configuration

Configure webhooks in agent action:

Action: "Reply to email and send webhook to Zapier"

Or use webhook tool directly:

webhook({
  url: "https://your-endpoint.com/webhook",
  method: "POST",
  data: {
    email: emailData,
    agent: agentName,
    actions: ["replied", "labeled"]
  }
})

Webhook Payload Example

{
  "email": {
    "id": "abc123",
    "threadId": "thread456",
    "from": "customer@example.com",
    "to": "support@company.com",
    "subject": "Support request",
    "body": "I need help with...",
    "date": "2024-01-15T10:30:00Z"
  },
  "agent": {
    "id": "agent_xyz",
    "name": "Support Triage"
  },
  "actions": [
    {
      "tool": "reply",
      "result": "success"
    },
    {
      "tool": "label",
      "result": "success",
      "labels": ["support-resolved"]
    }
  ],
  "timestamp": "2024-01-15T10:31:00Z"
}

See full webhook documentation →

MCP Server

Model Context Protocol server for connecting external AI tools.

What is MCP?

MCP (Model Context Protocol) allows AI applications like ChatGPT and Claude Desktop to use inbox.dog's tools to interact with your Gmail.

Available MCP Tools

All inbox.dog tools are available via MCP:

  • sendEmail - Send emails
  • replyToEmail - Reply to threads
  • searchEmails - Search Gmail
  • archiveEmail - Archive messages
  • labelEmail - Apply labels
  • starEmail - Star messages
  • Plus all custom agent tools

Connecting from ChatGPT

  1. Open ChatGPT settings
  2. Go to "Connections"
  3. Add MCP server: https://inbox.dog/mcp
  4. Complete OAuth flow
  5. Start using inbox.dog tools

Connecting from Claude Desktop

  1. Edit Claude Desktop config
  2. Add MCP server configuration
  3. Set server URL: https://inbox.dog/mcp
  4. Authenticate with OAuth
  5. Access Gmail from Claude

See full MCP documentation →

Internal REST Endpoints

For advanced integrations (requires authentication).

Available Endpoints

Endpoint Method Description
/api/agents GET List all agents
/api/agents POST Create new agent
/api/agents/[id] GET Get agent details
/api/agents/[id] PUT Update agent
/api/agents/[id] DELETE Delete agent
/api/logs GET Get agent logs
/api/analytics/events POST Track custom events

Authentication

All API endpoints require authentication via session cookies.

Example request:

curl https://inbox.dog/api/agents \
  -H "Cookie: better-auth.session_token=..."

See internal REST endpoints →

Rate Limits

Endpoint Type Limit Notes
Webhooks Per agent No global limit
MCP 100 req/min Per IP address
REST API 100 req/min Per user session

Security

  • OAuth 2.0 - Secure authentication
  • HTTPS only - All connections encrypted
  • Token encryption - Gmail tokens encrypted at rest
  • Scope isolation - Minimal required permissions

Use Cases

Zapier Integration

  1. Configure agent with webhook action
  2. Create Zapier webhook trigger
  3. Connect to 5000+ apps
  4. Automate workflows

Example: Email → inbox.dog → Zapier → Slack notification

Custom API Integration

  1. Set up webhook endpoint
  2. Configure agent to call webhook
  3. Process email data in your system
  4. Trigger custom workflows

Example: Support email → inbox.dog → Your CRM → Create ticket

AI Tool Integration

  1. Connect ChatGPT/Claude via MCP
  2. Use inbox.dog tools from AI chat
  3. Manage Gmail through conversation
  4. Build custom AI workflows

Example: "Show me unread emails" → ChatGPT → inbox.dog → Gmail API

Next Steps