API Documentation
Comprehensive guides and API references for integrating AntiBait's email threat detection into your applications.
Basic Analysis
FreeQuick email analysis providing header and body risk scores for basic threat detection.
API Endpoint
POST/api/analysis/basicRequest Body
{
"email": "string (full raw email)"
}Must include headers and body.
Response
{
"status": 200,
"success": true,
"analysisId": "uuid",
"cached": false,
"score": number,
"headerScore": number,
"bodyScore": number,
"threatType": null,
"type": null,
"confidence": null,
"tags": [],
"reasoning": null,
"falsePositiveChecks": [],
"error": null,
"data": object
}Example Request
Request
POST /api/analysis/basic
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY
{
"email": "From: [email protected]
To: [email protected]
Subject: Test Email
This is a test email body."
}Response
{
"status": 200,
"success": true,
"analysisId": "550e8400-e29b-41d4-a716-446655440000",
"cached": false,
"score": 8,
"headerScore": 15,
"bodyScore": 0,
"threatType": null,
"type": null,
"confidence": null,
"tags": [],
"reasoning": null,
"falsePositiveChecks": [],
"error": null,
"data": {
"headerDetails": { "score": 15 },
"bodyDetails": {
"score": 0,
"detectedLanguage": "en",
"categoryResults": {...}
}
}
}Response Fields
statusnumberHTTP status code (always 200 for successful requests)
successbooleanIndicates if the analysis was successful
analysisIdstring | nullUnique identifier for this analysis (UUID format)
cachedbooleanWhether the result was retrieved from cache
scorenumberAverage risk score (0-100) calculated from headerScore and bodyScore
headerScorenumberRisk score (0-100) based on email header analysis including SPF, DKIM, DMARC checks, and sender reputation
bodyScorenumberRisk score (0-100) based on email body content analysis including suspicious patterns, links, and attachments
dataobjectAdditional analysis details including headerDetails, bodyDetails (with detectedLanguage and categoryResults), and processed email metadata
errorstring | nullError message if analysis failed, null on success
Note: Basic analysis does not include AI-powered fields like threatType, confidence, tags, or reasoning. These are set to null or empty arrays. For comprehensive threat intelligence, use the Advanced Analysis endpoint.
Score Interpretation
Email appears legitimate with minimal risk indicators
Email contains suspicious elements that warrant caution
Email exhibits strong phishing or malicious indicators
Basic analysis provides quick header and body scores. For comprehensive threat intelligence with AI-powered detection, threat categorization, and detailed reasoning, upgrade to Premium for Advanced Analysis.
This endpoint requires a valid API key. Include your API key in the Authorization header as a Bearer token.
Need help integrating our API? Our support team is here to assist you.