WispInbox API
Create disposable inboxes and wait for OTP codes in automated QA flows. Built for Playwright, Cypress, and any HTTP client.
OTP API access
Free mailboxes get 3 OTP API calls/day. Pro mailboxes are unlimited.
Authentication
There is no separate “API keys” page. Your Bearer token is created automatically when you open a disposable inbox via the API.
How to get a Bearer token
- Call
POST /api/mailbox(no auth required for a new inbox). - Copy the
tokenfield from the JSON response. - Send
Authorization: Bearer <token>on routes marked with the lock badge.
Example response: {"address":"…@wispinbox.com","token":"abc123…","expiresAt":…}
— treat token like a password for that inbox only.
Authorization header requiredBearer <token> on protected endpoints (/api/messages, /api/otp, etc.).
In the browser app, the same token is stored in an HttpOnly cookie. For cookie-based calls from JS, send
X-Requested-With: fetch. Google/GitHub login is only for Pro account features — not required for basic API use.
Getting started
Typical OTP automation flow for signup tests:
- Create a mailbox with
POST /api/mailbox(optionally set a predictable name). - Fill that address in your app’s signup / login form.
- Long-poll
GET /api/otpuntil the verification code arrives.
Rate limits
GET /api/otp (free) quota3 calls per mailbox per day by default (OTP_API_FREE_LIMIT_PER_DAY).
GET /api/otp (Pro) quotaUnlimited OTP wait calls for Pro addresses.
429 otp_api_limit errorReturned when the free daily quota is exhausted. Upgrade that address to Pro to continue.
Public site configuration: domains, TTL, and feature flags.
Create a new disposable mailbox. Returns address, token, and expiresAt.
name string optionalLocal-part of the address (e.g. signup-e2e-123). Random if omitted.
domain string optionalMust be one of the configured domains (e.g. wispinbox.com).
Return the current mailbox for this token/session.
Delete a free mailbox (or clear the session for owned Pro addresses).
List inbox summaries, newest first.
Long-poll until an OTP-like code arrives. Ideal for QA: no UI scraping required. Default wait is 45s (max 120s).
timeoutMs integer optionalWait time in ms. Default 45000, max 120000.
digits integer optionalOTP length when pattern is not set. Default 6 (3–10).
pattern string optionalCustom regex. First capture group is returned as code.
flags string optionalRegex flags for pattern (i, m, s, u).
after string optionalOnly match mail received after this unix-ms timestamp or ISO date (server arrival time). Use this on every signup / resend so you don’t pick up an older code already in the mailbox. Caveat: a late first email can still arrive after your resend stamp — pair with markSeen=1 + unseenOnly=1, assert the code changed, or use a fresh mailbox per attempt.
subjectIncludes string optionalCase-insensitive subject filter.
fromIncludes string optionalCase-insensitive sender filter.
unseenOnly boolean optional1/true to match unread mail only.
markSeen boolean optional1/true to mark the matched message as seen.
Full message including html, text, and attachments metadata.
Server-Sent Events stream for live inbox updates (mail, expired).