AgentMail

An inbox your AI agent can own. Create it with one call, then wait for the OTP — no browser, no scraping, no IMAP.

1 · Create an inbox

curl -X POST https://$HOST/v1/inboxes \
  -H "authorization: Bearer $AGENTMAIL_KEY" \
  -H "content-type: application/json" \
  -d '{"label":"github"}'

# → {"id":"inb_6fda88884983","address":"github-12c334@myllmai.cloud"}

2 · Wait for the OTP (long-poll)

curl "https://$HOST/v1/inboxes/inb_6fda88884983/wait?type=otp&timeout=25" \
  -H "authorization: Bearer $AGENTMAIL_KEY"

# → {"ok":true,"otp":"907341","subject":"X confirmation code","from":"..."}

3 · Or grab the magic link

curl "https://$HOST/v1/inboxes/inb_6fda88884983/wait?type=link&timeout=25" \
  -H "authorization: Bearer $AGENTMAIL_KEY"

# → {"ok":true,"link":"https://example.com/verify?token=..."}

Endpoints

POST /v1/inboxes
GET /v1/inboxes
GET /v1/inboxes/:id/messages
GET /v1/inboxes/:id/otp
GET /v1/inboxes/:id/wait
POST /v1/send

Why agents need this

Signing up somewhere always ends in the same place — a code in an email. Give the agent its own address and it can finish the job: verify, confirm, reset, continue. OTP extraction handles 4–8 digit codes and magic links, in any language, with the label context.

Get early access

AgentMail · inbox + OTP for AI agents · docs · health