mail.gw API

Email / No Auth Required Beginner HTTPS CORS
Free to Use Varies (check documentation)

Overview

mail.gw is a REST API for creating and managing temporary 10-minute email addresses with full inbox access, all without authentication for basic use. You can create a new random account, authenticate to list received messages, and read full email bodies in JSON format. It is designed for automated testing pipelines that need real inboxes with no cleanup overhead.

💡

Beginner Tip

mail.gw uses a two-step flow: first create an account (POST /accounts) to get a temporary email address, then authenticate (POST /token) to receive a JWT, then use that JWT to check your inbox (GET /messages). Each step builds on the previous one.

Available Data

email delivery status
message ID
bounce/complaint data
open/click tracking
Use case: Integrate 10 minute mail data into web and mobile applications

Example Response

JSON Response
{
  "message_id": "msg_abc123def456",
  "status": "delivered",
  "to": "[email protected]",
  "subject": "Welcome!",
  "timestamp": "2025-01-15T10:30:00Z"
}

Field Reference

id Unique identifier for the created account or message
address The temporary email address created for this account
token JWT bearer token returned by POST /token, required for all authenticated inbox requests
hydra:member Array of message objects from GET /messages, each containing id, from, subject, and seen fields
text Plain text body of a specific email message, returned by GET /messages/{id}
createdAt Timestamp when the account or message was created

Implementation Example

const url = "https://docs.mail.gw/";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

422 Unprocessable Entity on account creation The requested email address or domain is unavailable or the password does not meet minimum requirements
Use the GET /domains endpoint first to get a currently available domain, then construct a random address on that domain
GET /messages returns empty array despite sending an email Emails may take 10–30 seconds to arrive; the API reflects real mail delivery times
Poll GET /messages with a short delay (5 seconds) rather than checking once immediately after sending a test email
401 on message retrieval after token was working mail.gw JWT tokens expire after a period of inactivity
Re-authenticate with POST /token using the same account credentials to get a fresh token when you receive 401 responses

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 20/20
🔒 Security 15/15
🛠 Developer XP 20/20
✓ Reliability 7/15
Response Time 84ms

Fully tested on Apr 5, 2026

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS YES
Category Email
Difficulty Beginner
Verified: 2026-04-04

Similar APIs

View All →