📚 Tài Liệu API
Tích hợp dịch vụ email tạm vào ứng dụng của bạn với REST API đơn giản.
🚀 Bắt Đầu
API miễn phí, không cần xác thực. Tất cả endpoints trả về JSON và tuân theo chuẩn HTTP status codes.
✓ Không cần API Key✓ JSON Response✓ CORS Enabled✓ Miễn phí 100%
📡 API Endpoints
Tạo Email Ngẫu Nhiên
NEWMô tả
Tạo địa chỉ email ngẫu nhiên. Có thể chỉ định domain hoặc để hệ thống chọn ngẫu nhiên.
Endpoint
https://mail.epmmo.com/api/random-emailhttps://mail.epmmo.com/api/random-email?domain=epmmo.comParameters
domain (tùy chọn)
Domain cụ thể để tạo email. Nếu không có, hệ thống chọn ngẫu nhiên.
Ví dụ Response
{
"email": "cool-duck-42@epmmo.com",
"username": "cool-duck-42",
"domain": "epmmo.com",
"inboxUrl": "https://mail.epmmo.com/cool-duck-42@epmmo.com",
"apiUrl": "https://mail.epmmo.com/api/email/cool-duck-42@epmmo.com"
}📬 Lấy Danh Sách Email
Mô tả
Lấy tất cả email đã nhận cho một địa chỉ email cụ thể.
Endpoint
https://mail.epmmo.com/api/email/test@epmmo.comParameters
email (bắt buộc)
Địa chỉ email cần lấy tin nhắn (string)
Ví dụ Response
[
{
"id": "cmivfgbva0000ja5ide131jiu",
"subject": "Tiêu đề email",
"createdAt": 1765094099000,
"expiresAt": 1765353299732,
"fromAddress": "sender@example.com",
"toAddress": "test@epmmo.com"
}
]📨 Xem Chi Tiết Email
Mô tả
Lấy nội dung chi tiết của một email theo ID. Bao gồm cả text và HTML content.
Endpoint
https://mail.epmmo.com/api/inbox/cmivfgbva0000ja5ide131jiuParameters
inboxId (bắt buộc)
ID duy nhất của email (string)
Ví dụ Response
{
"id": "cmivfgbva0000ja5ide131jiu",
"textContent": "Nội dung email dạng text",
"htmlContent": "<p>HTML content</p>",
"subject": "Tiêu đề email",
"expiresAt": 1765353299732,
"createdAt": 1765094099000,
"fromAddress": "sender@example.com",
"toAddress": "test@epmmo.com"
}🗑️ Xóa Email
Mô tả
Xóa một email cụ thể theo ID. Email sẽ bị xóa vĩnh viễn khỏi hệ thống.
Endpoint
https://mail.epmmo.com/api/delete/cmivfgbva0000ja5ide131jiuParameters
inboxId (bắt buộc)
ID duy nhất của email cần xóa (string)
Ví dụ Response
true
🌐 Lấy Danh Sách Domains
Mô tả
Lấy danh sách tất cả domains đang hoạt động, có thể sử dụng để tạo email tạm.
Endpoint
https://mail.epmmo.com/api/domainsParameters
Không cần parameters
Ví dụ Response
[ "epmmo.com", "epmmo.tech", "epchannel.click", "epchannel.icu" ]
💡 Ví Dụ Sử Dụng
JavaScript / Fetch API
// 1. Tạo email ngẫu nhiên
const response = await fetch('https://mail.epmmo.com/api/random-email');
const data = await response.json();
console.log(data.email); // "cool-duck-42@epmmo.com"
// 2. Lấy danh sách email
const emails = await fetch(`https://mail.epmmo.com/api/email/${data.email}`);
const inbox = await emails.json();
console.log(inbox); // Array of emails
// 3. Xem chi tiết email
const detail = await fetch(`https://mail.epmmo.com/api/inbox/${inbox[0].id}`);
const message = await detail.json();
console.log(message.textContent);cURL
# Tạo email ngẫu nhiên curl https://mail.epmmo.com/api/random-email # Lấy email với domain cụ thể curl "https://mail.epmmo.com/api/random-email?domain=epmmo.com" # Lấy danh sách domains curl https://mail.epmmo.com/api/domains # Lấy inbox curl https://mail.epmmo.com/api/email/test@epmmo.com # Xóa email curl https://mail.epmmo.com/api/delete/inbox_id_here
Python
import requests
# Tạo email ngẫu nhiên
r = requests.get('https://mail.epmmo.com/api/random-email')
data = r.json()
email = data['email']
print(f"Email: {email}")
# Lấy inbox
r = requests.get(f'https://mail.epmmo.com/api/email/{email}')
inbox = r.json()
print(f"Có {len(inbox)} email")
# Xem chi tiết
if inbox:
r = requests.get(f'https://mail.epmmo.com/api/inbox/{inbox[0]["id"]}')
message = r.json()
print(message['subject'])