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/api/analysis/headersRequest 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
FromSender email address
Reply-ToReply address (often differs in phishing)
Received-SPFSPF authentication result
DKIM-SignatureDigital signature verification
Authentication-ResultsCombined auth check results
Return-PathBounce/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
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.