Email API for AI agents: give each agent its own inbox
Obsession’s email API for AI agents gives each agent its own inbox in one call. It sends and receives, keeps every thread and attachment, and your app hears about each new email as it lands.
import { Obsession } from "obsession"const obsession = new Obsession({ apiKey: process.env.OBSESSION_API_KEY })// An inbox of its own, ready to send and receiveconst inbox = await obsession.inboxes.create()// Send from inbox.addressawait inbox.send({ to: "maria@larkfield.example", subject: "Your refund is on its way", text: "We sent $42.00 back to your card this morning.",})// Each reply reaches your webhook, in its threadawait obsession.events.subscribe({ url: "https://your-app.example/hooks/email", events: ["email.received"],})Its own inbox, so the code comes to the agent.
Most sign-ups send a link or a code by email. With its own address, the agent receives it, opens it and carries on, and every email after it stays in the thread.
- 01It signs up on a supplier portal
- 02The link lands in its own inbox
- 03It opens the link and carries on
- 04Every email after is kept
- 10:02:11page.visitedsupplier.example/register · ada@northpine.example · screenshot saved
- 10:02:19email.received“Confirm your email” · link inside
- 10:02:23page.visitedLink opened 4 s after it arrived · account active
- 10:40email.receivedYour trade price list · PDF attached
- Fri 09:00email.received“Prices rise 6% on 1 December”
Sign-in link opened 4 seconds after arriving
An email inbox for AI agents, with every thread kept.
Everything a person does with an inbox, done through code.
An inbox in one call
A new address for each agent, user or task, ready the moment the call returns.
Send and receive
Plain text or HTML, to anyone. Replies land back in the same inbox.
Threads kept for you
Replies are grouped by conversation, so your agent reads the whole exchange first.
Attachments both ways
Send files, and get every file that arrives: invoices, PDFs, images and calendar invites.
Codes read for you
Verification codes and confirm links are pulled out of each email, so a sign-up finishes without a person.
A webhook for every email
Your app gets each new message as it lands, with its thread and its files.
Every event reaches your webhook, your code or your agent.
Each event is saved in your event log, then sent where you listen.
The events it sends
email.received- An email lands in one of your inboxes, with its thread and attachments.
email.sent- An email your agent wrote leaves its inbox.
Where they reach you
One signed webhook
Subscribe once for every piece and blueprint. Each event is signed.
Your event log, by cursor
Read every event since the last one you saw.
Your own agent, over MCP
Events as tools, in Claude Code, Cursor or any MCP client.
Your handler, on our runtime
Your code runs about 50 ms after the event lands. No server to run.
A live stream while you build
Every event, forwarded to your laptop.
Zapier, Make and n8n
Each event starts a Zap, scenario or workflow.
If your server is down, events retry for 27 hours, and any event can be replayed.
See the code for each channelPay for the inboxes your agents keep and the mail they move.
Inboxes are billed by the month, email by the thousand.
See every price- Inbox
- $0.50 an inbox a month
- Free includes 3 inboxes.
- Emails
- $0.40 per 1,000 emails, sent or received
Add a piece when the job needs one.
One API key and one bill cover every piece.
- PersonasPut the inbox, a number and a browser under one name.
- BrowserSign up on a site in the browser, then confirm it from the inbox.
- PhoneA number beside the inbox, for sites that check a text code after the email one.
- SandboxRun code on the files that arrive, such as a spreadsheet or a PDF invoice.
- MessagingCarry on the same conversation on WhatsApp or iMessage when the person moves there.
Real mail, handled by your agent from the first message.
An API that gives an agent its own inbox. The agent sends and receives email through code, and a webhook tells your app about each new message.
AgentMail, Twilio, Browserbase and E2B in one APIYes. Start with inboxes, and add a phone number, a browser or a sandbox when a job needs one, on the same key and bill.
Subscribe your URL to email.received with obsession.events.subscribe, and each new message is posted to it with its thread and attachments. Any inbox can also be read through the API.
Yes. Add your domain once, with the DNS records we give you, and every inbox can send from it, signed so it reaches the inbox.
Inbox: $0.50 an inbox a month. Emails: $0.40 per 1,000 emails, sent or received. Free includes 3 inboxes.