Temporary Email API Overview
Use our API to quickly create and manage temporary email mailboxes. This document provides details on all core endpoints, authentication requirements, and example code. All requests use JSON format for data transfer.
Base URL: https://emailmux.com/api
Authentication
The API uses Bearer Token based authentication. You must provide your API Key in the HTTP Header of every request.
Request Header Example
Authorization: Bearer YOUR_SECRET_API_KEY Content-Type: application/json
/v1/auth
Log in to obtain Authorization credentials. The password field uses your API Key from the user center.
Request Body (Body)
| Parameter | Type | Required | Description |
|---|---|---|---|
| username | String | Yes | User account. |
| password | String | Yes | User API Key. |
Request Example (JavaScript)
// Example JavaScript Code (using Fetch) const url = "https://emailmux.com/api/auth"; const apiKey = "YOUR_SECRET_API_KEY"; const response = await fetch(url, { method: 'POST', headers: { 'Authorization': `Bearer ${apiKey}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ 'username': 'username1' 'password': 'password1' }) }); const data = await response.json(); console.log(data);
Successful Response (201 Created)
{
"success": true,
"Authorization": "Bearer ****** ",
}
/v1/random
Creates a new temporary email address. The system will generate a random address.
Request Body (Body)
| Parameter | Type | Required | Description |
|---|---|---|---|
| domian | String | Yes | Email domain suffix (e.g., ["outlook","hotmail","gmail_plus","googlemail","iCloud","tampmail"]). |
Request Example (JavaScript)
// Example JavaScript Code (using Fetch) const url = "https://emailmux.com/api/random"; const apiKey = "YOUR_SECRET_API_KEY"; const response = await fetch(url, { method: 'POST', headers: { 'Authorization': `Bearer ${apiKey}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ 'domian': ['outlook','hotmail','gmail','googlemail','iCloud','tampmail'] }) }); const data = await response.json(); console.log(data);
Successful Response (201 Created)
{
"success": true,
"address": "[email protected]",
}
/v1/emails
Creates a new temporary email address. The system will generate a random address.
Request Body (Body)
| Parameter | Type | Required | Description |
|---|---|---|---|
| address | String | Yes | The generated email address. |
Request Example (JavaScript)
// Example JavaScript Code (using Fetch) const url = "https://emailmux.com/api/emails"; const apiKey = "YOUR_SECRET_API_KEY"; const response = await fetch(url, { method: 'POST', headers: { 'Authorization': `Bearer ${apiKey}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ 'address': '[email protected]' }) }); const data = await response.json(); console.log(data);
Successful Response (201 Created)
{
"success": true,
"email": "xxxxxx",
}
Rate Limits
Currently, all users default to 60 Requests Per Minute (RPM). Exceeding this limit will return a 429 Too Many Requests status code.