REST API documentation
The Mailpipe API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes and authentication.
All API requests should be made to the following base URL:
https://api.mailpipe.dev/v1
All API endpoints are served over HTTPS. Unencrypted HTTP requests will be rejected.
Authenticate your API requests by including your API key in the Authorization header:
Authorization: Bearer mp_live_your-api-key-here
Keep your API keys secure
Your API keys carry many privileges. Do not share them in publicly accessible areas such as GitHub, client-side code, etc.
| Code | Description |
|---|---|
| 200 | OK - Request succeeded |
| 201 | Created - Resource successfully created |
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Invalid or missing API key |
| 403 | Forbidden - Insufficient permissions |
| 404 | Not Found - Resource does not exist |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Internal Server Error - Something went wrong |
Read, search, and manage email messages
/v1/messages/v1/messages/:id/v1/messages/v1/messages/:id/v1/messages/:idView email conversations grouped by thread
/v1/threads/v1/threads/:idManage email addresses and mailbox settings
/v1/mailboxes/v1/mailboxes/v1/mailboxes/:id/v1/mailboxes/:id/v1/mailboxes/:idConfigure and verify your email domains
/v1/domains/v1/domains/v1/domains/:id/v1/domains/:id/verify/v1/domains/:idManage API keys and permissions
/v1/keys/v1/keys/v1/keys/:idMonitor API usage and quotas
/v1/usageCurrent user information
/v1/meHere's an example of listing messages using cURL:
curl -X GET "https://api.mailpipe.dev/v1/messages?limit=10&unread=true" \ -H "Authorization: Bearer mp_live_your-api-key-here" \ -H "Content-Type: application/json"
Example response:
{
"data": [
{
"id": "msg_123abc",
"mailbox_id": "mbx_456def",
"from": "sender@example.com",
"to": ["you@yourdomain.com"],
"subject": "Hello World",
"snippet": "This is a preview of the email content...",
"is_read": false,
"is_starred": false,
"received_at": "2024-01-15T10:30:00Z"
}
],
"meta": {
"total": 42,
"limit": 10,
"offset": 0,
"has_more": true
}
}@mailpipe/sdknpm install @mailpipe/sdk
@mailpipe/mcp-servernpm install @mailpipe/mcp-server
API requests are rate limited to ensure fair usage. The default limits are:
Rate limit information is included in response headers: X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset.
Connect Claude or other AI assistants to your email using our MCP server.
Set up MCP Server