Skip to content
RSFlowHub
  1. Home
  2. APIs
  3. Safety & Moderation
  4. AI Text & Email Spam / Phishing Detection API
Safety & Moderation API

AI Text & Email Spam / Phishing Detection API

Automated detection of blog comment spam, promotional abuse, phishing links, and malicious bot content.

POST https://rsflowhub.com/api/v1/ai/spam-detection
  • 2 credits per call
  • First 1,000 calls free every month
  • X-API-Key header
  • JSON in, JSON out
POST /api/v1/ai/spam-detection
{
    "text": "WIN A FREE IPHONE NOW!!! Click here to claim your prize http://bit.ly/scam-link",
    "content_type": "blog_comment",
    "strictness": "high"
}
200 OK response.json
{
    "result": {
        "is_spam": true,
        "spam_score": 0.97,
        "spam_category": "phishing",
        "reason": "Unsolicited prize claim with a shortened link and urgency pressure."
    }
}
Definition

What is the AI Text & Email Spam / Phishing Detection API?

AI Text & Email Spam / Phishing Detection API is a REST API on RSFlowHub for web, mobile and AI agent applications. Send a JSON request to POST /api/v1/ai/spam-detection with your API key; RSFlowHub runs it on a tuned AI model, falls back to a backup provider if needed, and returns a structured JSON result, usually within 1 to 3 seconds.

Tutorial: Detect Contact Form Spam with Python (Flask and Django)

Try it without code or signup: Free spam detector

Endpoint
POST /api/v1/ai/spam-detection
Authentication
X-API-Key header
Price
2 credits per call, first 1,000 free / month
Rate limit
10 to 120 requests / minute by plan
Typical response
1 to 3 seconds
Format
JSON, UTF-8

Request parameters

Send these fields as a JSON body. An invalid or missing field returns a 422 error that names the field.

FieldTypeRequiredDescription
text string Required The raw text content to analyze (Max: 5,000 characters).
content_type string Optional Context of where the text came from (e.g., "blog_comment", "email", "product_review"). Helps the AI understand the expected format.
strictness string Optional Filter strictness: "low", "medium", or "high". Default is "medium".
detect_toxicity boolean Optional Optional. Set to true to analyze the text for hate speech, harassment, and severe profanity.
detect_pii boolean Optional Optional. Set to true to detect Personal Identifiable Information (emails, phone numbers, SSNs).
return_sanitized boolean Optional Optional. Set to true to receive a redacted version of the text where malicious links, profanity, and PII are replaced with "[REMOVED]".

Code examples

Copy, replace rfh_your_api_key with your key and run. Prefer a client library? See the official SDKs.

request.sh
curl -X POST "https://rsflowhub.com/api/v1/ai/spam-detection" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: rfh_your_api_key" \
  -d '{"text":"WIN A FREE IPHONE NOW!!! Click here to claim your prize http:\/\/bit.ly\/scam-link","content_type":"blog_comment","strictness":"high"}'

Response

Every RSFlowHub endpoint uses the same envelope, so one parser handles all of them. Failed calls are not charged.

response.json
{
    "success": true,
    "request_id": "req_3f9a2c7e-5b1d-4e8a-9c2f-7d6e1a0b4c8d",
    "data": {
        "result": {
            "is_spam": true,
            "spam_score": 0.97,
            "spam_category": "phishing",
            "reason": "Unsolicited prize claim with a shortened link and urgency pressure."
        }
    },
    "meta": {
        "version": "v1",
        "timestamp": "2026-10-05T09:30:00Z"
    }
}
Envelope fields
FieldTypeMeaning
successbooleantrue when the call worked, false on any error.
request_idstringUnique id for this call. Quote it when you contact support.
data.resultobjectThe result of this endpoint (see the example).
errorobjectOnly on failure: code, message and details per field.
metaobjectAPI version and server timestamp.

All error codes: Errors reference

Features

Multi-Vector Spam Probability Scoring

Evaluates text patterns, URL domain reputation, and bot characteristics to yield numeric spam confidence scores (0.0 to 1.0).

Configurable Strictness Levels

Adjust detection strictness between low, medium, high, and aggressive modes depending on user risk profile.

Phishing Link & Abuse Detection

Scans inline links for suspicious redirects, scam domains, shortened URLs, and phishing indicators.

Real-Time Form Moderation

High-speed execution built for real-time contact form validation and blog comment submission gates.

Use cases

How teams use the AI Text & Email Spam / Phishing Detection API in production.

CMS & Publishing

Blog & Forum Comment Filtering

Filter user-submitted blog comments to automatically block casino link spam, SEO link building, and bot comments.

Input
WIN A FREE IPHONE NOW!!! Click here to claim your prize http://bit.ly/scam-link
Output
{"is_spam": true, "confidence": 0.99, "reasons": ["phishing_link", "promotional_shouting"]}

Keeps community comment sections clean with 0 manual effort.

Marketing SaaS

Contact Form & Lead Scrubbing

Screen lead contact form submissions to block malicious sales bots and fake marketing inquiry spam.

Input
Hi, we offer cheap SEO backlinks starting at $10. Reply if interested.
Output
{"is_spam": true, "confidence": 0.95, "reasons": ["unsolicited_seo_spam"]}

Ensures sales teams only work with legitimate leads.

SaaS Platform

User Registration Bot Defense

Block automated registration attempts using temporary spam email domains and bot profile text.

Input
User bio: Buy cheap followers at http://fakefollowers.com fast delivery!
Output
{"is_spam": true, "confidence": 0.97, "reasons": ["disallowed_commercial_link"]}

Protects database from fake bot user accounts.

AI chatbot

Keep spam out of your AI chatbot

Public chatbots and lead forms attract spam and junk messages that waste credits and fill your inbox. Check a message with the spam API before the chatbot answers it or saves it as a lead.

How it works in a chatbot

  1. Visitor: "Earn $500 a day from home, click this link"
  2. API returns: is_spam true, score 0.97
  3. Chatbot ignores it and does not save a lead

Protect your credits

Do not pay for an AI reply to a message that is obviously spam.

Cleaner leads

Screen names, emails and messages before they reach your lead list.

Adjustable strictness

Choose how strict the check is for chat messages versus long form messages.

Want a chatbot without building one? The RSFlowHub AI chatbot for your website is live in about 5 minutes with one script tag: it answers from your documents, captures leads and creates support tickets. Read the chat widget guide, try the live chatbot demo, see chatbot pricing, or build your own with the chatbots API.

AI Text & Email Spam / Phishing Detection API vs building it yourself

The same job done three ways.

TopicRSFlowHub APIRaw LLM promptsRules / regex
Output Validated JSON fieldsFree text you have to parseFixed patterns only
Setup One POST request, no promptsWrite and maintain prompts and parsingWrite and maintain rule lists
Provider outage Automatic fallback to a backup modelYou build retries and a second vendorNot applicable
Pricing 2 credits per call, failed calls freePer token, per vendorYour own servers and upkeep
Understands context Yes, AI modelYes, AI modelNo, keywords only

Frequently asked questions

How does the Spam Detection API classify spam?
The API evaluates textual patterns, keyword density, all-caps shouting, link domain safety, and bot signatures to compute a 0.0 to 1.0 spam probability score.
Can I adjust the strictness of spam filtering?
Yes! You can choose between "low", "medium", "high", and "aggressive" strictness to match your application safety requirements.
Does the API detect phishing links and malware URLs?
Yes. The API scans embedded URLs for shortened link abuse, suspicious TLDs, and known phishing patterns.
How fast is the Spam Detection API?
Spam Detection requests usually complete in 1 to 3 seconds, depending on input length and the AI model. Identical repeat requests are served from cache and return faster.
How many credits does each request consume?
Spam Detection API calls consume 2 base credits per request.

Start using the AI Text & Email Spam / Phishing Detection API

Free plan with 100 credits/month + 1,000 bonus credits when you sign in before 23 Nov. Test it in the playground first, no code needed.

RSFlowHub

Sign in to continue

You'll come straight back to this page.

Forgot password?

New to RSFlowHub? Create a free account