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
- Agent processes an email
- Agent executes
webhooktool - Payload sent to configured URL
- 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 emailsreplyToEmail- Reply to threadssearchEmails- Search GmailarchiveEmail- Archive messageslabelEmail- Apply labelsstarEmail- Star messages- Plus all custom agent tools
Connecting from ChatGPT
- Open ChatGPT settings
- Go to "Connections"
- Add MCP server:
https://inbox.dog/mcp - Complete OAuth flow
- Start using inbox.dog tools
Connecting from Claude Desktop
- Edit Claude Desktop config
- Add MCP server configuration
- Set server URL:
https://inbox.dog/mcp - Authenticate with OAuth
- Access Gmail from Claude
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=..."
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
- Configure agent with webhook action
- Create Zapier webhook trigger
- Connect to 5000+ apps
- Automate workflows
Example: Email → inbox.dog → Zapier → Slack notification
Custom API Integration
- Set up webhook endpoint
- Configure agent to call webhook
- Process email data in your system
- Trigger custom workflows
Example: Support email → inbox.dog → Your CRM → Create ticket
AI Tool Integration
- Connect ChatGPT/Claude via MCP
- Use inbox.dog tools from AI chat
- Manage Gmail through conversation
- Build custom AI workflows
Example: "Show me unread emails" → ChatGPT → inbox.dog → Gmail API