Documentation

Get started with MailSink in under 5 minutes.

Quickstart

  1. Get your API key via GitHub
  2. Create an inbox: POST /v1/inboxes
  3. Use the email address for signup/verification
  4. Extract the code: GET /v1/inboxes/:id/latest-code

Authentication

All API requests require a Bearer token:

Authorization: Bearer msk_your_api_key_here

Endpoints

MethodPathDescription
POST/v1/inboxesCreate inbox
GET/v1/inboxesList active inboxes
DELETE/v1/inboxes/:idDelete 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/:idFull message content
GET/v1/messages/:id/rawRaw .eml download
POST/v1/keysCreate API key
DELETE/v1/keys/:idRevoke API key

Create inbox

POST /v1/inboxes
Content-Type: application/json

{
  "local_part": "signup",
  "domain": "yourdomain.com",
  "ttl": 3600
}

// Response
{
  "id": "inb_rae1znj8eh4a",
  "address": "signup-k8m2@codenotify.net",
  "expires_at": "2026-04-20T15:00:00Z"
}

Extract verification code

GET /v1/inboxes/inb_rae1z/latest-code

// Response
{
  "code": "847291",
  "from": "noreply@stripe.com",
  "subject": "Your verification code",
  "received_at": "2026-04-20T14:01:23Z"
}

Returns null for code if no code found yet. Poll /wait-for-code to block until it arrives.

MCP server

npm install @mailsink/mcp

Available tools: create_inbox, wait_for_email, get_verification_code, get_verification_link, list_messages, list_inboxes, delete_inbox.

Rate limits

PlanLimit
Free60 req/min
Pro600 req/min
Team3,000 req/min

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