Two-way email API
A two-way email API lets software both send and receive mail through one persistent mailbox, then read the replies back as structured data - send, receive, and read-back against a single inbox object. It contrasts with a send-only transactional API, which is built to fire messages out and gives no stored inbox to read from. Most email APIs are built to send; a two-way API treats the mailbox as something your code owns and operates in both directions. Sairaph Mail exposes a two-way mailbox over a REST API and a native MCP server: outbound on POST /api/v1/mailboxes/{id}/outbound, inbound on GET /api/v1/mailboxes/{id}/messages.
Last updated June 30, 2026
Why "two-way" is the load-bearing distinction
Many tasks only work if the same identity can send *and* read. Confirming a signup, catching a one-time code, handling a reply, or running a back-and-forth conversation all require reading the response to something you sent - and reading it against the address that sent it. A send-only API can deliver the first message but leaves you to assemble receiving, storage, and threading from other tools. A two-way API closes that loop: one mailbox, one credential, one consistent shape for both directions.
How Sairaph Mail implements two-way
- Send -
POST /api/v1/mailboxes/{id}/outboundwith a requiredIdempotency-Keyheader. Returns202with{ object: "message", id: "msg_…", status: "queued" }. SeeSEND_CURL,SEND_FETCH,SEND_PYincode-samples.ts. - Receive and read -
GET /api/v1/mailboxes/{id}/messages?direction=inboundreturns a Stripe-style list;live=trueadds an on-demand fetch with a cached fallback. SeeREAD_INBOUND_CURLand friends. - Over MCP too - the same mailbox is reachable from an MCP-capable agent at
/mcp/v1/mcp(streamable-HTTP), authenticated with the same scoped mailbox key. SeeMCP_CLAUDE_DESKTOPandMCP_GENERIC_CLIENT.
Both directions run against one mailbox object, with messages stored encrypted at rest under a per-customer key.
Related terms
- [Inbound email API](/glossary/inbound-email-api) - the receive/read half of a two-way API.
- [Programmatic mailbox](/glossary/programmatic-mailbox) - the persistent inbox a two-way API acts on.
- [Agent mailbox](/glossary/agent-mailbox) - a two-way mailbox owned and operated by an AI agent.
Related
Give your agent a real mailbox
Two-way email over REST and a native MCP server, EU-resident by default.
EU data residencyPer-customer encryptionNative MCP