OTP · Magic links · Free · No signup

Read verification codes and magic links — for scripts and agents.

A sign-up emails an OTP and the flow stalls — your script or AI agent has no inbox to read it from. smails is a free disposable inbox that receives the code, and hands you the full message over the web, CLI, REST API, or MCP so you can pull the code out.

How it works

  1. 1

    Create a disposable mailbox — instantly, with no signup.

  2. 2

    Use its address wherever a verification code or magic link is required.

  3. 3

    smails receives the email the moment it's sent.

  4. 4

    Read the message; pull the code or link out of the body.

  5. 5

    An AI agent reads it straight from the text; a script greps or parses it.

From the command line

Grab a code by hand in three commands.

terminal
# create a disposable inbox, then read the code
npx @smails/cli create
npx @smails/cli inbox          # see what arrived
npx @smails/cli read <id>      # full body — copy the code

In a script

Poll the REST API and pull the code out of the body — no key, no signup.

bash
# poll for the code with the REST API
TOKEN=$(curl -sX POST https://smails.dev/api/mailbox | jq -r .token)
# ...use the address, then read the latest message:
curl -s https://smails.dev/api/mailbox/messages \
  -H "Authorization: Bearer $TOKEN" | jq -r '.[0].id'
# fetch its body and grep the 6-digit code:
curl -s https://smails.dev/api/mailbox/messages/<id> \
  -H "Authorization: Bearer $TOKEN" | grep -oE '[0-9]{6}'

Want an agent to do this on its own? The MCP server exposes the same flow as tools, and the full REST API is documented separately.

FAQ

Never wait on a code again.

Open a disposable inbox and start receiving verification codes in seconds.