Skip to content
RSFlowHub
  1. Home
  2. APIs
  3. Safety & Moderation
  4. Sensitive Data & PII Redaction API
Safety & Moderation API

Sensitive Data & PII Redaction API

Automated detection and masking of sensitive PII, names, emails, phone numbers, and financial tokens.

POST https://rsflowhub.com/api/v1/ai/pii-redaction
  • 1 credit per call
  • First 1,000 calls free every month
  • X-API-Key header
  • JSON in, JSON out
POST /api/v1/ai/pii-redaction
{
    "text": "Customer John Doe called from 555-123-4567 regarding his account. He verified his email as john.doe@example.com and his SSN is 000-11-2222.",
    "redact_types": [
        "names",
        "emails",
        "ssn"
    ],
    "redaction_style": "placeholder",
    "return_entities": true
}
200 OK response.json
{
    "result": {
        "redacted_text": "Contact [NAME] at [EMAIL] or [PHONE] about invoice 2041.",
        "entities_redacted": [
            {
                "type": "name",
                "count": 1
            },
            {
                "type": "email",
                "count": 1
            },
            {
                "type": "phone",
                "count": 1
            }
        ]
    }
}
Definition

What is the Sensitive Data & PII Redaction API?

Sensitive Data & PII Redaction API is a REST API on RSFlowHub for web, mobile and AI agent applications. Send a JSON request to POST /api/v1/ai/pii-redaction 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: How to Redact PII from Support Tickets in Node.js

Try it without code or signup: Free pii redactor

Endpoint
POST /api/v1/ai/pii-redaction
Authentication
X-API-Key header
Price
1 credit 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 to be sanitized (Max: 10,000 characters).
redact_types array of strings Optional Specific types to redact. Allowed: `names`, `emails`, `phone_numbers`, `credit_cards`, `ssn`, `addresses`, `passwords`, `ip_addresses`. If empty, redacts all high-risk PII.
redaction_style string Optional How to mask the data. `placeholder` (e.g., [EMAIL]), `asterisk` (e.g., j***@gmail.com), or `scramble`. Default is `placeholder`.
return_entities boolean Optional Optional. If true, returns an analytics array summarizing the types of PII detected and redacted.

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/pii-redaction" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: rfh_your_api_key" \
  -d '{"text":"Customer John Doe called from 555-123-4567 regarding his account. He verified his email as john.doe@example.com and his SSN is 000-11-2222.","redact_types":["names","emails","ssn"],"redaction_style":"placeholder","return_entities":true}'

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": {
            "redacted_text": "Contact [NAME] at [EMAIL] or [PHONE] about invoice 2041.",
            "entities_redacted": [
                {
                    "type": "name",
                    "count": 1
                },
                {
                    "type": "email",
                    "count": 1
                },
                {
                    "type": "phone",
                    "count": 1
                }
            ]
        }
    },
    "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

Multilingual PII Entity Recognition

Detects names, emails, phone numbers, SSNs, credit cards, IP addresses, and physical addresses.

Flexible Masking Formats

Replace sensitive tokens with category placeholders (e.g. [NAME], [EMAIL]), asterisks, or cryptographic hashes.

Structured Entity Breakdown

Returns structured JSON detailing detected entity types, character offsets, and confidence scores.

Compliance-First Privacy

Processed in memory over encrypted TLS 1.3 channels. Never logged or used for public AI training.

Use cases

How teams use the Sensitive Data & PII Redaction API in production.

AI Data Pipeline

AI Prompt & Fine-Tuning Data Scrubbing

Scrub sensitive customer PII from raw logs before sending data to third-party AI models or fine-tuning datasets.

Input
Customer John Doe (email: john@example.com, SSN: 000-11-2222) requested account deletion.
Output
Customer [NAME] (email: [EMAIL], SSN: [SSN]) requested account deletion.

Prevents accidental data leaks and ensures compliance.

Customer Support

Helpdesk Support Transcript Masking

Mask credit card numbers and phone numbers in live chat transcripts before archiving to database.

Input
My card number is 4532-1100-8899-1234 and phone is 555-0199.
Output
My card number is [CREDIT_CARD] and phone is [PHONE_NUMBER].

Achieves PCI-DSS and GDPR compliance for support logs.

Health & Legal

Healthcare & Legal Document Anonymization

Anonymize medical notes and legal intake forms prior to internal research and analysis.

Input
Patient Jane Smith presented symptoms at St. Jude Hospital on 2026-08-15.
Output
Patient [PATIENT_NAME] presented symptoms at [HOSPITAL] on [DATE].

Keeps personal data out of logs, tickets and analytics tools.

AI chatbot

Redact personal data in your AI chatbot

Visitors paste phone numbers, emails and card details into chats. Run chat text through the PII redaction API before you store a transcript, send it to a third-party tool or hand it to a new team member, so personal data does not spread.

How it works in a chatbot

  1. Visitor: "my email is priya@example.com and my number is 98765 43210"
  2. API returns: "my email is [EMAIL] and my number is [PHONE]"
  3. Transcript is saved with the personal data masked

Safer transcripts

Keep conversation history useful for training and review without keeping raw contact details.

Share logs with confidence

Send redacted chats to analytics, support tools or agencies.

Works before storage

Redact on the way in, so the sensitive version is never written to your database.

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.

Sensitive Data & PII Redaction 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 1 credit per call, failed calls freePer token, per vendorYour own servers and upkeep
Understands context Yes, AI modelYes, AI modelNo, keywords only

Frequently asked questions

Which PII entity types can the API detect and redact?
The API detects names, email addresses, phone numbers, Social Security Numbers (SSN), credit card numbers, IP addresses, dates of birth, and physical addresses.
Is PII data stored or logged on RSFlowHub servers?
No. Payload data is processed strictly in memory over TLS encrypted connections and is never written to disk or logged.
Can I customize the replacement placeholder text?
Yes! You can choose between category placeholders (e.g. [NAME], [EMAIL]), character masks (e.g. ***), or SHA-256 hashes.
How fast is the PII Redaction API?
PII Redaction 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 are consumed per request?
Standard PII Redaction API requests consume 1 base credit per call.

Start using the Sensitive Data & PII Redaction 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