开发者 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": []
}

限流:每 IP 每分钟 10 次请求。

获取收件箱

GET https://10genmail.com/api/inbox?address=...

查询:address(URL 编码的邮箱)。返回收件箱和邮件,过期返回 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
    }
  ]
}

限流:每 IP 每分钟 120 次请求。

延长收件箱

POST https://10genmail.com/api/inbox/extend

Body: { "address": "..." }。增加 10 分钟,自创建起总计最多 30 分钟。返回更新后的收件箱。

限流:与 get 相同(120/分钟)。

临时邮箱 API 开发者 | 10genmail