Guides
Guides: receiving email in agents, tests and backends
Step-by-step guides for the jobs RESTAPI.email is built for: an AI agent reading its verification code, an end-to-end test waiting for an OTP, and a backend turning inbound email into JSON. Every example runs against the live API as documented in the docs.
Last reviewed:
All guides
MCP · Claude Code · Cursor
Let Claude Code receive email verification codes
Connect the remote MCP server to Claude Code, Claude Desktop or Cursor, prompt it to mark the inbox before a sign-up, and keep the key scoped to one inbox.
Testing · Playwright · CI
Receive OTP emails in Playwright tests
Replace sleeps and polling loops with one long-poll per email. TypeScript and Python examples, parallel workers and magic links.
Webhooks · HMAC · Node.js · Python
Parse inbound email to JSON with signed webhooks
The payload, HMAC signature verification in Node.js, Python and Web Crypto, the retry schedule and idempotent handlers.
Agents · Tool calling · OpenAI Agents SDK · LangChain
Give a browser or LLM agent an inbox for sign-ups
Two framework-agnostic tools and a JSON schema, wired into the OpenAI Agents SDK or LangChain, with the pitfalls that cause wrong codes.
Which one do I need?
If an agent with tools (Claude, Cursor, any MCP client) should read the email itself, start with the Claude Code guide. If you write the agent loop yourself, the sign-up automation guide gives you the tool code. Tests that wait for an email belong in the Playwright guide, and anything that should react to mail as it arrives, in the webhook guide.
Choosing between services? The comparisons set RESTAPI.email against AgentMail, MailSlurp and Mailosaur, including where they are the better choice.
Give your agent an inbox this afternoon
Create an account, pick a plan, and read your first message with one authenticated request.
Receive-only. Paid plans, by card, cancel any time.