Temp Mail API
The YelMail Temp Mail API is a REST API for disposable inboxes. Create a temporary email address from your test suite, sign up like a real user, then read the verification code or magic link it receives.
Every response is JSON in the shape { data } or { error: { code, message } }. API keys come with Premium. New to email testing? Follow the step-by-step Playwright guide.
Authentication
Send your Premium API key as a bearer token. Rate limits are returned in X-RateLimit-Remaining. Guest clients such as the browser extension can instead pass the token returned by POST /inboxes in an X-Inbox-Token header.
# Create an inbox
curl -X POST https://yelmail.com/api/v1/inboxes \
-H "Authorization: Bearer tm_your_key" \
-H "Content-Type: application/json" -d '{}'
# Read its messages
curl https://yelmail.com/api/v1/inboxes/INBOX_ID/messages \
-H "Authorization: Bearer tm_your_key"Endpoints
/domains
List domains you can create addresses on
/inboxes
Create an inbox (random, or custom with localPart + domainId)
/inboxes
List your active inboxes
/inboxes/{id}
Get one inbox
/inboxes/{id}
Update label or forwarding target
/inboxes/{id}
Delete an inbox and its emails
/inboxes/{id}/messages
List messages (newest first, cursor pagination)
/inboxes/{id}/stream
Server-Sent Events stream of new messages
/messages/{id}
Get a message with text, sanitized HTML and attachments
/messages/{id}
Delete a message
/messages/{id}/attachments/{attachmentId}
Download an attachment
/messages/{id}/report
Report an email as objectionable (spam, phishing, harassment, sexual, violence, other). It is removed from your inbox and reviewed by staff
/messages/{id}/block
Block the sender of an email: their mail is removed and future mail is dropped for you
/me
Current user and plan entitlements
/me/session
Sign out the bearer session token sent with the request (apps, extension)
/extension/token
Browser extension sign-in: trade a connect code and PKCE verifier for a session token
/extension/login
Browser extension sign-in: trade an email and password for a session token
/mobile/config
Mobile apps: what this server offers (Google client ID, Sign in with Apple, push notifications)
/push/device
Mobile apps: register this install for push notifications, or update its language and switches
/push/device
Mobile apps: stop push notifications to this install
/push/opened
Mobile apps: report that a campaign notification was tapped
/extension/config
Browser extension: sign-in methods this server offers (Google client ID)
/extension/google
Browser extension sign-in: trade a Google ID token (and the nonce it was requested with) for a session token
Need higher limits? Contact us.