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
POST/api/analysis/body

Request 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

scorenumber

Overall 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
detectedLanguagestring

Detected language of the email body (e.g., "en" for English, "es" for Spanish)

categoryResultsobject

Detailed breakdown of threat categories with individual scores and detected indicators:

phishing

Phishing-related keywords and patterns

urgency

Urgent or pressure tactics

financial

Financial or payment-related content

suspicious_links

Suspicious URLs or link patterns

attachments

Attachment-related indicators

Each category contains a score and an array of specific indicators found.

Best Practices
  • 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.