Let agents receive OTP codes without a human inbox.
mails0 gives AI agents a mailbox they can use for signups, confirmation links, and 2FA emails. The agent calls one command or tool and gets the latest verification code.
Why email verification breaks agent workflows
Most services still send account proof through email. If the agent cannot read that inbox quickly, the signup flow stalls and the OTP expires. Personal Gmail, throwaway inboxes, and IMAP polling all add state that agents should not manage directly.
No receiving surface
Send-only APIs cannot receive the verification email that a signup form just triggered.
Manual inbox handoff
Asking a person to read the code defeats the point of autonomous browser and coding agents.
Mailbox-scoped code wait
mails0 stores inbound email and exposes a deterministic wait-for-code primitive with timeouts.
Use it from CLI, Python, HTTP, or MCP
Start with the CLI while testing. Move the same mailbox and key into your agent runtime when the flow works.
# CLI
mails code --to [email protected] --timeout 60
# HTTP
curl -s "https://api.mails0.com/v1/[email protected]&timeout=60" \
-H "Authorization: Bearer $MAILS_API_KEY"
# MCP
wait_for_code({ "timeout": 60, "sender": "[email protected]" })
Recommended browser-agent flow
Create or reuse a mailbox
Use a hosted sandbox mailbox for experiments, or self-host on Cloudflare when account identity and domain reputation matter.
Submit the signup form
Pass the mailbox address into Playwright, Puppeteer, Browserbase, or your agent's browser tool.
Wait for the OTP
Call mails code or the MCP wait_for_code tool with a bounded timeout.
Complete verification
Paste the code into the verification screen and keep the mailbox for future login, reset, or reply workflows.
FAQ
Can mails0 detect confirmation links as well as codes?
The inbox API exposes full messages for link extraction. The dedicated code endpoint focuses on OTP-style codes; use inbox/search for confirmation links.
Should I use a shared hosted domain for production signups?
Use hosted mailboxes for testing and demos. For production, self-host mails0 on your own domain so you control reputation, DNS, keys, data, and limits.