Authenticated API
Mail Deliverability
メール到達性に関わる SPF / DKIM / DMARC / MX / BIMI をまとめて診断し、スコアと改善ポイントを返します。
Endpoint
GET /api/v1/mail-deliverability?host=example.com
認証
ログイン済みブラウザセッション、または Authorization: Bearer <ioh_live_...> ヘッダの API キーが必要です。
パラメタ
| 名前 | 型 | 必須 | 説明 |
|---|---|---|---|
| host | string | 必須 | 対象ドメイン |
curl サンプル
curl "https://infra.yuzlrin.jp/api/v1/mail-deliverability?host=example.com" -H "Authorization: Bearer ioh_live_xxxxxxxxxxxxxxxxxxxxxxxx"レスポンス例
{
"host": "example.com",
"spf": {
"found": true,
"record": "v=spf1 include:_spf.example.com ~all",
"terminator": "~all",
"includes": ["_spf.example.com"],
"warnings": []
},
"dkim": { "found": true, "selectors": ["google"] },
"dmarc": { "found": true, "record": "v=DMARC1; p=none;", "policy": "none", "rua": [], "warnings": [] },
"mx": [{ "priority": 10, "exchange": "mail.example.com" }],
"ptr": ["mail.example.com"],
"score": 82,
"grade": "B",
"recommendations": ["DMARC p=none は監視のみ。p=quarantine 以上へ段階適用"]
}共通エラー
| Status | code | 意味 |
|---|---|---|
| 400 | missing_parameter / invalid_host / invalid_url / invalid_parameter / ssrf_blocked | 入力不正または SSRF 保護による拒否。ssrf_blocked は reason を含む場合があります。 |
| 401 | auth_required / invalid_api_key / api_key_required | ログインまたは API キーが必要です。Site Health Check は API キー専用です。 |
| 413 / 415 | payload_too_large / unsupported_media_type | POST JSON のサイズ超過または Content-Type 不一致。 |
| 429 | rate_limited | レスポンス本文に resetInSec、ヘッダに Retry-After を含みます。 |
| 500 | internal_error | 内部エラー。エラー応答は Cache-Control: no-store です。 |
{
"error": "Invalid URL",
"code": "invalid_url"
}
{
"error": "Rate limited",
"code": "rate_limited",
"resetInSec": 3600
}制限事項
- ログインセッション 300 回 / 日。API キー Free プラン 1000 回 / 日 + 30000 回 / 月。
- SSRF 保護 — private IP / metadata ホストへのリクエストは拒否。
- 通信量・対象負荷を配慮した利用をお願いします。