API Documentation

v1.0

Strict UUID-Scoped Access & Security Model

MailReader's API is strictly isolated per mailbox. Every request requires a valid uuid. There is no global list, no anonymous database browsing, and only holders of a specific UUID can access that individual mailbox. All session tokens remain encrypted with AES-256 (Fernet) on the backend.

API Endpoints

GET/api/otp
⚡ Instant Plaintext OTP Code (Best for Bots)

Scans both Inbox + Spam for the given mailbox and returns the latest verification code directly as a plain text string. If no code has arrived yet, returns an empty response.

curl "https://www.mailreader.tech/api/otp?uuid=37f33872-8026-2a02-aaa8-f42cdd3744aa"

Response (text/plain)

849201
GET/api/latest?format=json
Latest Email Metadata & Extracted Code (JSON)

Returns the latest email object with sender, subject, date, preview, and the automatically parsed OTP code in a structured JSON payload.

curl "https://www.mailreader.tech/api/latest?uuid=37f33872-8026-2a02-aaa8-f42cdd3744aa&format=json"

Response (application/json)

{
  "email": "OrvinStegmann87140@outlook.com",
  "otp": "849201",
  "subject": "Your Instagram verification code",
  "from": "Instagram",
  "from_address": "security@mail.instagram.com",
  "date": "2026-08-24T12:00:00Z",
  "preview": "Use 849201 to verify your account...",
  "message_id": "AAMkAD..."
}
GET/api/read_code?uuid=...&folder=inbox&limit=25
Full Mailbox Folder Listing (JSON)

Returns all messages inside a specific folder (inbox, junk, sent, etc.) with pagination limit.

curl "https://www.mailreader.tech/api/read_code?uuid=37f33872-8026-2a02-aaa8-f42cdd3744aa&folder=inbox&limit=20"

Headless Browser Bots (Puppeteer / Playwright / Selenium)

If your bot opens the visual website, navigate directly with the #latest hash tag to auto-open the newest email and scrape standardized DOM selectors:

// 1. Open the URL with #latest hash
await page.goto("https://www.mailreader.tech/read_code?uuid=37f33872-8026-2a02-aaa8-f42cdd3744aa#latest");

// 2. Wait for incoming code selector
await page.waitForSelector("#latest-otp");

// 3. Extract the verification code
const otpCode = await page.$eval("#latest-otp", el => el.innerText);
console.log("Extracted OTP:", otpCode);