Email Infrastructure for AI Agents

One API call spawns an agent with its own inbox, durable thread storage, and webhooks into n8n or Windmill. Open source, runs on Cloudflare.
spawn-agent.sh
curl -X POST https://api.sendook.com/agents \
  -H "Authorization: Bearer $SENDOOK_MASTER_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "support-bot"}'

# → { "id": "k4m2x9p3qa1z",
#     "email": "k4m2x9p3qa1z@sendook.com",
#     "name": "support-bot",
#     "api_key": "sk_…",
#     "created_at": 1730764200 }

Built for developers building the future

AI Agents
Transactional Email
Customer Support
Automation

Core Features

  • POST /agents and you get an addressable mailbox. No DNS dance, no domain handshake — just an email address you can hand to a customer or another service.
  • Every message — sent and received — is persisted in the agent's own SQLite. Threading is automatic from In-Reply-To and References, so /threads gives you the conversation, not a pile of messages.
  • Register a URL per agent and receive HMAC-signed JSON on every inbound and outbound. Wire it straight into n8n, Windmill, or your own Worker.

API Request

POST /inboxes

Inbox
Webhook
JSON

Ready

inbox_a1b2c3@sendook.com

Built on Cloudflare

Workers for the API surface, Durable Objects for per-agent state, Email Routing and Email Sending for the actual mail. No servers to manage, scales to zero.
  • POST /agents/:id/messages/send takes to/cc/bcc, subject, text or html, and attachments. Replies set In-Reply-To automatically.
  • Inbound mail lands on Cloudflare Email Routing, hits the Worker, gets parsed by postal-mime, and is fanned out to your webhooks within seconds.
  • MIT licensed. Deploy to your own Cloudflare account in minutes, or wait for the hosted offering.

What you get

A small, honest API. The pieces below are shipping today on Workers + Email Service.
Spawn-an-agent API
POST /agents creates an agent, allocates an inbox at @your-domain, and returns a per-agent API key. List and delete agents the same way.
Per-agent API keys
Each agent has its own bearer key, scoped to its inbox. Use the master key for admin moves; hand out per-agent keys for everything else.
HTTP send + JSON inbound
Send via Cloudflare Email Sending. Receive via Email Routing. The Worker hands you structured JSON, not raw RFC-5322.
HMAC-signed webhooks
Subscribe a URL to message.received, message.sent, or both. Payloads are HMAC-SHA256 signed, retried with exponential backoff, and the attempt log is queryable.
Threading out of the box
GET /agents/:id/threads/:threadId returns the conversation in send order. We do the In-Reply-To and References plumbing so you don't.
Open source
MIT licensed on GitHub. The code is the spec — no hidden control plane, no vendor magic, just Workers you can read.

Spin up an agent and send your first email

The Worker is on Cloudflare's free tier for typical usage. Read the getting-started guide, generate a master key, and POST /agents.