API Docs

フロントエンドで実際に使用しているAPI仕様を、そのまま公開しています。

最終更新日: 2026-02-17

base url: 同一オリジン content type: application/json auth: x-api-key / bearer

共通ヘッダ / 共通仕様

  • X-History-Token: 履歴APIで必須。^[A-Za-z0-9_-]{24,128}$ を推奨。
  • X-API-Key または Authorization: Bearer <token>: レートリミット除外キー。
  • 一部APIはブロック時に 403 でJSONではなくHTMLページを返します。

Mailbox APIs

GET/api/{email_address}

メール一覧を取得します。

[
  {
    "id": 12345,
    "from": "no-reply@example.com",
    "subject": "Welcome",
    "created_at": "2026-02-17 19:40:12"
  }
]
GET/api/mailbox/{email_address}/mail/{mail_id}

メール詳細を取得します。

{
  "id": 12345,
  "from": "no-reply@example.com",
  "subject": "Welcome",
  "body": "plain text body",
  "html_body": "<p>html body</p>",
  "attachments": [
    {
      "index": 0,
      "filename": "invoice.pdf",
      "content_type": "application/pdf",
      "size": 12902,
      "download_url": "/api/mailbox/123%40example.com/mail/12345/attachment/0",
      "content_id": "cid-123"
    }
  ],
  "headers": [
    { "name": "Message-ID", "value": "<abc@example.com>" }
  ],
  "created_at": "2026-02-17 19:40:12"
}

content_id は存在する場合のみ返ります。

GET/api/mailbox/{email_address}/mail/{mail_id}/attachment/{attachment_index}

添付ファイルをバイナリで返します(JSONではありません)。

GET/api/mailbox/{email_address}/mail/{mail_id}/eml

message/rfc822 で .eml を返します。

POST/change_mailbox

新しいメールアドレスに切り替えます。

{
  "domain": "chinpomail.com"
}
{
  "new_email": "1234567@chinpomail.com",
  "domains": ["chinpomail.com", "temporary-mail.paicha.cloud"]
}
GET/api/domains

選択可能ドメイン一覧。

{
  "domains": ["chinpomail.com", "temporary-mail.paicha.cloud"]
}

History / Stats APIs

POST/api/history/list

X-History-Token 必須。履歴一覧 + プレビューを返します。

{
  "offset": 0,
  "limit": 30,
  "query": "amazon"
}
{
  "entries": [
    {
      "email": "1234567@chinpomail.com",
      "updated_at": 1761035729123,
      "preview": {
        "email": "1234567@chinpomail.com",
        "message_count": 2,
        "latest_subject": "Confirm your account",
        "latest_from": "service@example.com",
        "latest_created_at": "2026-02-17 19:32:10",
        "is_remote": false
      }
    }
  ],
  "offset": 0,
  "limit": 30,
  "total": 1,
  "has_more": false,
  "max": 500,
  "query": "amazon"
}
POST/api/history/previews

X-History-Token 必須。指定アドレスのプレビューのみ更新したいときに使います。

{
  "emails": ["1234567@chinpomail.com"]
}
{
  "previews": [
    {
      "email": "1234567@chinpomail.com",
      "message_count": 2,
      "latest_subject": "Confirm your account",
      "latest_from": "service@example.com",
      "latest_created_at": "2026-02-17 19:32:10",
      "is_remote": false
    }
  ],
  "max": 500
}
GET/api/stats/public

公開統計を返します。

{
  "email_received_total": 462552,
  "access_total": 7368018,
  "domain_ranking": [
    { "domain": "chinpomail.com", "count": 1234 }
  ],
  "totals_updated_at": "2026-02-17T10:30:00",
  "domain_ranking_updated_at": "2026-02-17T00:00:00",
  "totals_refresh_seconds": 3600,
  "domain_ranking_refresh_seconds": 86400
}

Review / Application APIs

POST/api/abuse-review

ブロック画面からのAIレビューAPIです。

{
  "decision": "keep",
  "review_score": 71.3,
  "remaining_seconds": 412,
  "remaining_clock": "06:52",
  "cooldown_remaining": 0,
  "reason": "high-risk",
  "summary": "signals: ...",
  "signals": [],
  "model_version": "risk-v3.0",
  "review_reason_brief": "Current traffic still looks risky...",
  "review_metadata": {
    "ip": "203.0.113.1",
    "review_kind": "ip",
    "mailbox": "1234567@chinpomail.com"
  }
}
POST/api-key-request

使い方ページのAPIキー申請フォームから利用します。

{
  "name": "your name",
  "email": "you@example.com",
  "company": "your project",
  "expected_rate": "60 req/min",
  "usage": "what you need",
  "notes": "optional"
}
{
  "ok": true,
  "message": "申請を受け付けました。確認後にご連絡します。"
}

レートリミット運用

安定運営のためレートリミットがあります。高頻度アクセス時は制限されます。
制限解除を希望する場合は、使い方ページの申請フォームから申請してください。審査後にAPIキーを発行します。

主なエラー形式

  • 403: ブロックHTML(メールAPI系)
  • 429: {"detail":"Too many ... requests."} + Retry-After ヘッダ
  • 400/404: {"detail":"..."}

PyPI モジュール

Python向けには mail-paicha-cloud を公開しています。

pip install mail-paicha-cloud

URL: https://pypi.org/project/mail-paicha-cloud/