Email infrastructure for agents
Documentation
Create real inboxes, send and receive threaded email, react to events, and connect AI agents through REST, MCP, or the CLI.
New to BotInbox
Start here#
- QuickstartCreate a key, an inbox, and send your first email.
- Remote MCPOne-line setup for Claude Code, Cursor, and other MCP clients.
- CLIInstall with Homebrew or one command, then manage inboxes and mail from your terminal.
- API referenceOpenAPI JSON for generated clients and tooling.
- llms.txtA compact index to hand to an AI coding assistant.
Browse
Resources#
Every REST resource: inboxes, messages, threads, domains, keys, webhooks, and more.
- InboxesDedicated email identities owned by an account or grouped in a pod.
- MessagesSend, search, paginate, inspect, and update inbound or outbound email.
- Email APISend transactional email from any address on your verified domain: single sends, batches, idempotent retries and status.
- DraftsCreate, revise, send, and discard messages before delivery.
- LabelsOrganize messages with inbox-scoped colored labels.
- Sender rulesAllow or block exact addresses and domains before inbound mail is stored.
- ThreadsConversation groups built from Message-ID and In-Reply-To headers.
- Conversation insightsAgents label message sentiment and conversation outcomes, and hand conversations to a person when needed.
- AttachmentsAttachment metadata and authorized downloads for inbound messages.
- DomainsVerify a custom mail domain and provision branded inboxes.
- PodsGroup inboxes for tenant isolation and issue pod-scoped API keys.
- API keysHashed bearer credentials that belong to your organization, scoped to the whole account, a pod, an inbox or a sending domain.
- WebhooksSigned, retried callbacks for received mail and email delivery events, with filters and replay.
- SuppressionsAddresses you never send to: automatic after bounces and complaints, and managed through the API.
- EventsLive message.received and message.sent events through Server-Sent Events.
- Usage and plansInspect the active plan, resource caps, send volume, and unread count.
Browse
Integrations#
Connect agents and tools: MCP, Claude Code, Cursor, the CLI, TypeScript, and plain REST.
- MCP (remote + local)Give Claude, Cursor, VS Code, Windsurf, and other MCP clients BotInbox email tools: hosted at /mcp or local over stdio.
- CursorConnect Cursor to the hosted BotInbox MCP server.
- Claude Code and desktop MCP clientsAdd BotInbox to Claude Code with one command, or to Claude Desktop with a short config.
- TypeScript and JavaScriptCall the REST API from Node.js, Deno, Bun, or edge runtimes with fetch. An official npm SDK is coming soon.
- REST and curlCall BotInbox from any language with standard HTTP and JSON.
- CLIManage inboxes, send and read mail, stream events, and wait for verification codes from a terminal or CI with the botinbox CLI.
Browse
Guides#
Quickstart, custom domains, security, multi-tenancy, limits, and troubleshooting.
- QuickstartSign in, create an API key, and send and receive your first email in a few minutes.
- Sending and receivingBuild a full email conversation loop for an agent.
- Organizations, roles and membersHobby accounts for one person, organizations for teams: roles, pod access, invitations, and user licenses.
- Multi-tenancy with podsIsolate each customer's inboxes and credentials.
- SecurityScoped API keys, signed webhooks, data handling, and abuse protection.
- Errors and troubleshootingCommon status codes and setup failures.
- Acceptable use & limitsSending rules, new-account warm-up, suppression, and the error codes they return.
- Custom domainsSend and receive as your own domain: plan requirements, setup flow, and the DNS records to publish.
- Delivery reliability and your own SMTPAutomatic failover across delivery providers on Team and Enterprise, and bring-your-own SMTP for custom domains.
- Analytics & privacyWhat product analytics BotInbox collects on its website and dashboard, and what it never collects.
Browse
Examples#
Small, complete agents you can copy and run.
01 · Start here
Create and use an inbox#
Create an API key in the dashboard, then list the inboxes available to that key.
export BOTINBOX_API_KEY=bi_your_key
curl https://botinbox.dev/v0/inboxes \
-H "Authorization: Bearer $BOTINBOX_API_KEY"Send from an inbox using its ID:
curl https://botinbox.dev/v0/inboxes/INBOX_ID/messages \
-H "Authorization: Bearer $BOTINBOX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"to":"human@example.com","subject":"Hello","text":"Sent by my agent"}'02 · Reference
REST API#
All /v0 endpoints use Authorization: Bearer bi_.... Lists return data and, where applicable, next_cursor.
Inboxes
GET|POST /v0/inboxes
Messages
GET|POST /v0/inboxes/:id/messages
Threads
GET /v0/inboxes/:id/threads
Domains
GET|POST /v0/domains
Pods
GET|POST /v0/pods
API keys
GET|POST /v0/api-keys
Webhooks
GET|POST /v0/webhooks
Usage
GET /v0/me
Use the OpenAPI document for generated clients and API tooling. Search messages with ?q=, filter with ?unread=true, and paginate with ?limit= and ?cursor=.
03 · Agent integration
Connect MCP clients#
BotInbox hosts a remote MCP server at https://botinbox.dev/mcp with tools for inboxes, sending, replying, searching, threads, drafts, labels, usage, and wait_for_email for verification codes. Create an API key in the dashboard, then register it in Claude Code:
claude mcp add --transport http botinbox https://botinbox.dev/mcp \
--header "Authorization: Bearer bi_your_key"Or add this to .cursor/mcp.json (Cursor) or your client's MCP configuration:
{
"mcpServers": {
"botinbox": {
"url": "https://botinbox.dev/mcp",
"headers": {
"Authorization": "Bearer bi_your_key"
}
}
}
}Clients that only launch local commands, such as Claude Desktop, can connect through mcp-remote. Setup for every client →
04 · Terminal
Install the CLI#
The botinbox CLI manages inboxes, sends and reads mail, streams events, and waits for verification codes in CI. Install it with Homebrew on macOS or the one-line installer on macOS and Linux:
brew install botinbox-dev/tap/botinbox
# or
curl -fsSL https://botinbox.dev/install.sh | shOn Windows, run irm https://botinbox.dev/install.ps1 | iex in PowerShell. Direct downloads and checksums are on the CLI download page. CLI reference →
05 · Events
Receive signed webhooks#
Add an HTTPS endpoint in the dashboard or with POST /v0/webhooks. New inbound mail produces a message.received payload. BotInbox retries failed deliveries up to three times.
const expected = createHmac("sha256", webhookSecret)
.update(rawRequestBody)
.digest("hex");
const valid = timingSafeEqual(
Buffer.from(`sha256=${expected}`),
Buffer.from(request.headers["x-botinbox-signature"])
);06 · Live updates
Live events (SSE)#
For long-running agents, consume the authenticated Server-Sent Events stream. It emits message.received and message.sent for every inbox the key can see.
curl -N https://botinbox.dev/v0/events \
-H "Authorization: Bearer $BOTINBOX_API_KEY"07 · Identity
Use a custom domain#
On Builder and Team, add a domain in the dashboard, publish the verification and mail records it shows, then verify it. Create inboxes on the verified domain. New domains are send-only by default (no MX record); to receive, add a subdomain such as in.example.com so an existing MX setup stays untouched. DNS records explained →
08 · AI onboarding
Documentation for agents#
Give an AI coding assistant /llms.txt for a compact capability and endpoint index, or give it the OpenAPI JSON for structured API discovery. For tool use, the MCP configuration above is the preferred path.