A clean, versioned REST API to generate inboxes, retrieve messages, and integrate TempMail into your own applications.
Sub-100ms response times globally. 99.9% uptime SLA with automatic failover.
All requests require an API key over HTTPS. TLS 1.3 enforced. Keys rotatable instantly.
Every endpoint has parameters, types, examples, and error codes. See the API Reference.
Push message events to your server instead of polling — Premium feature.
10 req/min on Free. 120 req/min and 50k/day on Premium. Limits in response headers.
JavaScript, Python, and PHP SDKs. Community SDKs for Go, Ruby, and Rust.
// 1. Generate address const { email } = await fetch( 'https://api.tempmail.io/v1/generate_email.php?key=YOUR_KEY' ).then(r => r.json()); // 2. Poll inbox every 5s const msgs = await fetch( `https://api.tempmail.io/v1/inbox.php?key=YOUR_KEY&email=${email}` ).then(r => r.json()); // 3. Read message & extract OTP const msg = await fetch( `https://api.tempmail.io/v1/read.php?key=YOUR_KEY&email=${email}&id=${msgs[0].id}` ).then(r => r.json()); console.log('OTP:', msg.otp); // "482910"