API สำหรับนักพัฒนา
ใช้ API สร้างกล่องจดหมายชั่วคราว อ่านจดหมาย และขยายอายุที่อยู่ มีจำกัดอัตราต่อ IP
สร้างกล่องจดหมาย
POST https://10genmail.com/api/inbox
ไม่ต้องส่ง body คืนที่อยู่ใหม่และรายการจดหมายว่าง
{
"address": "quick-fox-abc123@10genmail.com",
"slug": "quick-fox-abc123",
"createdAt": 1234567890123,
"expiresAt": 1234568490123,
"ttlSeconds": 600,
"messages": []
}จำกัดอัตรา: 10 คำขอ/นาที/IP
ดึงกล่องจดหมาย
GET https://10genmail.com/api/inbox?address=...
Query: address (อีเมลที่ encode แล้ว) คืนกล่องจดหมายและจดหมาย หรือ 404 ถ้าหมดอายุ
{
"address": "quick-fox-abc123@10genmail.com",
"slug": "quick-fox-abc123",
"createdAt": 1234567890123,
"expiresAt": 1234568490123,
"ttlSeconds": 420,
"messages": [
{
"id": "msg-...",
"from": { "name": null, "email": "sender@example.com" },
"subject": "Hello",
"text": "...",
"html": null,
"date": "...",
"timestamp": 1234567900000
}
]
}จำกัดอัตรา: 120 คำขอ/นาที/IP
ขยายกล่องจดหมาย
POST https://10genmail.com/api/inbox/extend
Body: { "address": "..." } เพิ่ม 10 นาที รวมสูงสุด 30 นาทีนับจากสร้าง คืนกล่องจดหมายที่อัปเดต
จำกัดอัตรา: เหมือน get (120/นาที)