API Documentation

Comprehensive guides and API references for integrating AntiBait's email threat detection into your applications.

Analyze Email Headers

Analyze email headers for authentication failures, spoofing attempts, and routing anomalies.

API Endpoint

POST
POST/api/analysis/headers

Request Body

{
  "headers": {
    "Header-Name": "value",
    "Another-Header": "value"
  }
}

Object with header names as keys.

Response

{
  "score": number
}

Single score value (0-100).

Example Request

Request

POST /api/analysis/headers
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY

{
  "headers": {
    "From": "[email protected]",
    "Reply-To": "[email protected]",
    "Return-Path": "[email protected]",
    "Received-SPF": "pass",
    "DKIM-Signature": "v=1; a=rsa-sha256; ...",
    "Authentication-Results": "spf=pass; dkim=pass"
  }
}

Response

{
  "score": 0
}

// All authentication checks passed

Key Headers to Include

From

Sender email address

Reply-To

Reply address (often differs in phishing)

Received-SPF

SPF authentication result

DKIM-Signature

Digital signature verification

Authentication-Results

Combined auth check results

Return-Path

Bounce/return email address

Analysis Checks

SPF Validation

Verifies sender IP authorization

DKIM Verification

Checks email signature authenticity

DMARC Compliance

Validates domain alignment policy

Address Mismatch

Detects From/Reply-To discrepancies

Domain Reputation

Checks sender domain trustworthiness

Routing Analysis

Examines email path and hops

Include All Available Headers

The accuracy of the analysis improves significantly with more header information. Include all available headers from the email source for the most comprehensive assessment. Missing critical headers like SPF, DKIM, or Authentication-Results may result in incomplete analysis.

Need help integrating our API? Our support team is here to assist you.