Quickstart: from zero to send + receive in 10 minutes
What you'll do: stand up a real, EU-hosted mailbox your agent owns, then send and read mail from it - over REST and (optionally) a native MCP server - in about ten minutes. No domain, no DNS, no SMTP, no OAuth dance.
Last updated June 30, 2026
What you'll have at the end
- A provisioned mailbox with a
mbx_…public id. - A scoped
sm_live_…key your agent uses on every call. - A sent email and a read inbox - over REST.
- The same mailbox wired into an MCP-capable agent runtime.
Before you start
- A Sairaph Mail account (every plan includes a mailbox to follow this).
- A terminal with
curl(the snippets also come infetchand Python on the API docs).
Steps
1. Provision a mailbox (≈2 min)
In Dashboard → Mailboxes → New mailbox, pick a mailbox on a Sairaph domain (instant, e.g. you@sairaph.email) or bring your own domain and add the DNS records shown if you want a custom address. When it's ready, copy its public id - mbx_…. You'll substitute this for $MAILBOX_ID below.
2. Issue and export a key (≈2 min)
Keys are dashboard-issued only (the issuance surface is not agent-callable by design). In Dashboard → API keys, pick the mailbox, choose read_write (so you can both send and read) and an optional expiry, and copy the sm_live_… secret - it's shown once. Then export it:
3. Send your first email (≈2 min)
The Idempotency-Key header is required on send, so a retried request can never double-send.
Expected response (202 Accepted):
4. Read the inbox (≈2 min)
Send the mailbox a test email from any account, then read inbound. direction=inbound reads the cache; live=true forces an on-demand fetch.
You'll get a Stripe-style list envelope; each inbound row is a cached_message or live_message with from_addr, subject, and a snippet. (Full read + pagination details: Receive email via API.)
5. Connect over MCP (≈2 min, optional)
If your agent runtime speaks MCP, register the server and the mailbox's actions appear as tools - same sm_live_… key as a Bearer token, streamable-HTTP transport. The bare endpoint:
For a Claude Desktop-style client config:
More client configs (remote runtimes, generic clients) are on the MCP page.
When something goes wrong
Errors use a Stripe-shaped envelope, so you can branch on error.type / error.code:
- Send rejected: add the required
Idempotency-Keyheader (a fresh UUID per send). - `401`/`403`: key missing/expired, or scoped too low for the action (
readcan't send). - `404` mailbox not found: you passed an email address instead of the
mbx_…id, or the key is bound to a different mailbox. - `429`: over the rate limit - wait for the
Retry-Afterinterval and retry.
Next steps
- Wire it into a framework or runtime: the developer quickstart and MCP guide.
- Real-time reads in depth: Receive email via API.
- The classic agent task: Read a verification code (OTP).
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