API Documentation

All MailPeek tools are available as free JSON APIs. No authentication required. Rate limits apply.

Base URL: https://mailpeek.net/api

📨 Header Analyzer

POST/api/tools/analyze-headers

Analyze raw email headers. Returns sender info, authentication results, relay chain, and risk score.

Request Body

{
  "headers": "Received: from mail.example.com...\nFrom: [email protected]\n..."
}

Response

{
  "provider": "Google",
  "origin_ip": "209.85.220.41",
  "ip_info": { "org": "Google LLC", "country": "US", "asn": "AS15169" },
  "from": "[email protected]",
  "reply_to": "",
  "domain": "example.com",
  "spf": "Pass",
  "dkim": "Pass",
  "dmarc": "Pass",
  "relay_chain": [
    { "from": "mail.example.com", "by": "mx.google.com", "ip": "209.85.220.41" }
  ],
  "risk_score": 5,
  "risk_notes": []
}

🔍 Domain Check

POST/api/tools/domain-check

Check email configuration for any domain. Returns MX records, SPF, DKIM, DMARC, and blacklist status.

Request Body

{
  "domain": "gmail.com"
}

Response

{
  "domain": "gmail.com",
  "mx": [
    { "priority": 5, "host": "gmail-smtp-in.l.google.com" }
  ],
  "spf": { "record": "v=spf1 redirect=_spf.google.com", "valid": true },
  "dkim": { "found": true, "selector": "google" },
  "dmarc": { "record": "v=DMARC1; p=none; ...", "policy": "none" },
  "blacklists": [
    { "name": "Spamhaus ZEN", "listed": false },
    { "name": "Barracuda", "listed": false }
  ],
  "overall_health": "good"
}

⚠️ Phishing Detector

POST/api/tools/phishing-check

Check if an email address, URL, or domain is potentially a phishing attempt.

Request Body

{
  "input": "[email protected]"
}

Response

{
  "input": "[email protected]",
  "input_type": "email",
  "domain": "totally-legit-bank.com",
  "risk_level": "suspicious",
  "risk_score": 45,
  "checks": [
    { "name": "Domain Age", "status": "warn", "detail": "Domain is 12 days old" },
    { "name": "SPF Record", "status": "warn", "detail": "No SPF record found" }
  ],
  "recommendations": [
    "Verify the sender through an independent channel"
  ]
}

⏱️ Temporary Inbox

POST/api/inbox/create

Create a new temporary email inbox with a specified duration.

Request Body

{
  "duration_seconds": 600
}

Response

{
  "address": "[email protected]",
  "created_at": "2026-08-26T12:00:00Z",
  "expires_at": "2026-08-26T12:10:00Z",
  "duration_seconds": 600,
  "emails": []
}
GET/api/inbox/{address}/messages

Poll for new messages in a temporary inbox. Returns all messages received since creation.

Response

{
  "address": "[email protected]",
  "expires_at": "2026-08-26T12:10:00Z",
  "emails": [
    {
      "id": "uuid-here",
      "from": "[email protected]",
      "subject": "Verify your account",
      "body_text": "Click here to verify...",
      "body_html": "<p>Click here to verify...</p>",
      "received_at": "2026-08-26T12:02:15Z"
    }
  ]
}

❤️ Health Check

GET/api/health

Check service health status.

Response

{
  "status": "healthy",
  "timestamp": "2026-08-26T12:00:00Z",
  "version": "1.0.0",
  "checks": { "redis": true }
}

Rate Limits

Header Analyzer60 requests/hour
Domain Check30 requests/hour
Phishing Detector30 requests/hour
Inbox Creation10 inboxes/hour
Message PollingNo limit

Rate limits are per IP address. Exceeded limits return HTTP 429 with a Retry-After header.