Guides, API references, SDK docs, webhooks, and changelogs — all in one place.
No account needed. Generate a temporary address instantly and start receiving mail.
Go to tempmail.io — a fresh disposable address is generated automatically. No sign-up, no captcha.
Click Copy Address and paste it into any sign-up form or field that asks for an email.
Emails arrive via WebSocket. OTP codes and verification links are parsed and highlighted automatically.
After 60 minutes (or your configured TTL), the address and all messages are permanently deleted.
When you load TempMail, the frontend calls GET /api/generate_email.php which provisions a random mailbox on our SMTP relay. Your browser opens a WebSocket connection to the message delivery service simultaneously.
When mail is sent to your address it arrives at our relay, is encrypted with AES-256-GCM, and pushed to your open WebSocket — typically within 1–3 seconds.
/verify, /confirm, or /activate. Detected values surface as one-click UI actions.Install the SDK for your language and start integrating in minutes.
Async/await, TypeScript types included.
npm install tempmail-sdk
Sync + asyncio clients. pytest-ready.
pip install tempmail
PSR-18 compatible. Laravel examples.
composer require tempmail/sdk
The three-step pattern behind every TempMail integration.
const { email } = await fetch( 'https://api.tempmail.io/v1/generate_email.php?key=YOUR_KEY' ).then(r => r.json()); console.log(email); // "k9x2m7@tempmail.io"
const msgs = await fetch( `https://api.tempmail.io/v1/inbox.php?key=YOUR_KEY&email=${email}` ).then(r => r.json()); // [{ id, sender, subject, date_received }]
const msg = await fetch( `https://api.tempmail.io/v1/read.php?key=YOUR_KEY&email=${email}&id=${msgs[0].id}` ).then(r => r.json()); if (msg.otp) console.log('OTP:', msg.otp); if (msg.confirmation_link) console.log('Link:', msg.confirmation_link);
The read.php endpoint returns a pre-parsed otp field automatically.
import requests, re msg = requests.get('https://api.tempmail.io/v1/read.php', params={ 'key': KEY, 'email': email, 'id': msg_id }).json() # Pre-parsed field (recommended) if msg['otp']: print(f"OTP: {msg['otp']}") # Fallback: regex on raw body match = re.search(r'(\d{4,8})', msg['body']) if match: print(f"Code: {match.group(1)}")
otp field is null when no code is detected. Always check confirmation_link as a fallback — some services send links instead of numeric codes.Register a webhook URL and we'll POST the parsed message payload to your server within 500 ms of delivery. Premium only.
curl -X POST "https://api.tempmail.io/v1/webhook.php" -d "key=YOUR_KEY" -d "email=k9x2m7@tempmail.io" -d "url=https://yourserver.com/hook"
{
"event": "message.received",
"id": "msg_a1b2c3",
"email": "k9x2m7@tempmail.io",
"sender": "noreply@github.com",
"subject": "Verify your email address",
"otp": "482910",
"confirmation_link": null,
"received_at": "2026-03-07T13:05:22Z"
}Add an MX record, register via API, then pass domain= when generating addresses. Premium only.
Type: MX Host: @ (or a subdomain: temp) Value: mx.tempmail.io Priority: 10 TTL: 3600
# Register domain curl -X POST "https://api.tempmail.io/v1/domains.php" -d "key=YOUR_KEY&domain=yourcompany.com" # Generate address on that domain curl "https://api.tempmail.io/v1/generate_email.php?key=YOUR_KEY&domain=yourcompany.com"
temp.yourcompany.com so your main company MX records are unaffected.X-RateLimit-Remaining.