DOCS/QUICKSTART

Documentation

Provision a temp inbox, point your signup flow at it, pull the OTP — in three REST calls or one MCP tool call.

5 min read Last updated · 2026-05-12 v1.0.0

Quickstart

  1. Sign in with GitHub to get your API key (prefixed msk_).
  2. Create an inbox: POST /v1/inboxes
  3. Use the returned address in your signup or verification flow.
  4. Extract the code: GET /v1/inboxes/{id}/latest-code

Authentication

All API requests require a Bearer token:

http
Authorization: Bearer msk_your_api_key_here

Endpoints

METHODPATHDESCRIPTION
POST/v1/inboxesCreate inbox
GET/v1/inboxesList active inboxes
DELETE/v1/inboxes/{id}Delete inbox
GET/v1/inboxes/{id}/messagesList messages
GET/v1/inboxes/{id}/latest-codeLatest OTP code
GET/v1/inboxes/{id}/latest-linkLatest verification link
GET/v1/inboxes/{id}/wait-for-codeBlock until OTP arrives
GET/v1/messages/{id}Full message content
GET/v1/messages/{id}/rawRaw .eml download
POST/v1/keysCreate API key
DELETE/v1/keys/{id}Revoke API key

Create inbox

curl
curl -X POST https://api.mailsink.dev/v1/inboxes \
  -H "Authorization: Bearer $MAILSINK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"local_part":"signup"}'

# Response (HTTP 201)
{
  "id":         "inb_rae1znj8eh4a",
  "address":    "[email protected]",
  "expires_at": "2026-05-13T10:00:00Z"
}
TIP
Provide local_part if you want a memorable prefix; otherwise MailSink generates one. Domain rotates across codenotify.net / letterhub.net / mailkite.net.

Extract verification code

curl
curl https://api.mailsink.dev/v1/inboxes/inb_rae1z/latest-code \
  -H "Authorization: Bearer $MAILSINK_API_KEY"

# Response
{
  "code":        "847291",
  "from":        "[email protected]",
  "subject":     "Your verification code",
  "received_at": "2026-05-12T14:01:23Z"
}
PROTIP
For CI runs, use GET /v1/inboxes/{id}/wait-for-code — it long-polls (up to 30s) until a code arrives. No retry loop, no flaky 200/null shuffle.

MCP server

For AI agents, drop the MCP server into Claude Desktop, Cursor, or Claude Code:

json · claude-desktop config
{
  "mcpServers": {
    "mailsink": {
      "command": "npx",
      "args":    ["-y", "@mailsink/mcp"],
      "env":     { "MAILSINK_API_KEY": "msk_..." }
    }
  }
}

Tools available: create_inbox, wait_for_email, get_verification_code, get_verification_link, list_messages, list_inboxes, delete_inbox, get_message.

Rate limits

PLANLIMITBURST
Free60 req/min
Pro600 req/min30 burst
Team3,000 req/min200 burst

Response headers: X-RateLimit-Limit, X-RateLimit-Remaining.