API Documentation
Comprehensive guides and API references for integrating AntiBait's email threat detection into your applications.
Analyze Email Body
Analyze email body content for suspicious patterns, malicious links, and phishing indicators.
API Endpoint
POST/api/analysis/bodyRequest Body
{
"emailBody": "string"
}Response
{
"score": number,
"detectedLanguage": string,
"categoryResults": object
}Example Request
Request
POST /api/analysis/body
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY
{
"emailBody": "This is a legitimate test email."
}Response
{
"score": 0,
"detectedLanguage": "en",
"categoryResults": {
"phishing": { "score": 0, "indicators": [] },
"urgency": { "score": 0, "indicators": [] },
"financial": { "score": 0, "indicators": [] },
"suspicious_links": { "score": 0, "indicators": [] },
"attachments": { "score": 0, "indicators": [] }
}
}// No suspicious patterns detected
Analysis Scope
URL Analysis
Detection of suspicious, shortened, or malicious links
Content Patterns
Identification of phishing keywords and urgency tactics
Social Engineering
Detection of manipulation techniques and scam indicators
Attachment References
Suspicious attachment mentions and download requests
Response Fields
scorenumberOverall body risk score ranging from 0 to 100, where:
- 0-30: Low risk - Content appears legitimate
- 31-60: Medium risk - Suspicious patterns detected
- 61-100: High risk - Strong phishing/malicious indicators
detectedLanguagestringDetected language of the email body (e.g., "en" for English, "es" for Spanish)
categoryResultsobjectDetailed breakdown of threat categories with individual scores and detected indicators:
phishingPhishing-related keywords and patterns
urgencyUrgent or pressure tactics
financialFinancial or payment-related content
suspicious_linksSuspicious URLs or link patterns
attachmentsAttachment-related indicators
Each category contains a score and an array of specific indicators found.
- Include the complete email body text, including HTML if available
- Combine with header analysis for comprehensive threat detection
- Consider using the full analysis endpoint for automated workflows
- Body analysis is most effective when used alongside URL and header checks
Need help integrating our API? Our support team is here to assist you.