Multilingual PII Entity Recognition
Detects names, emails, phone numbers, SSNs, credit cards, IP addresses, and physical addresses.
Automated detection and masking of sensitive PII, names, emails, phone numbers, and financial tokens.
https://rsflowhub.com/api/v1/ai/pii-redaction
X-API-Key header{
"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
}
{
"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
}
]
}
}
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
POST /api/v1/ai/pii-redactionX-API-Key headerSend these fields as a JSON body. An invalid or missing field returns a 422 error that names the field.
| Field | Type | Required | Description |
|---|---|---|---|
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. |
Copy, replace rfh_your_api_key with your key and run. Prefer a client library? See the official SDKs.
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}'
<?php
$client = new \GuzzleHttp\Client();
$response = $client->post('https://rsflowhub.com/api/v1/ai/pii-redaction', [
'headers' => [
'Content-Type' => 'application/json',
'X-API-Key' => 'rfh_your_api_key',
],
'json' => array (
'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' =>
array (
0 => 'names',
1 => 'emails',
2 => 'ssn',
),
'redaction_style' => 'placeholder',
'return_entities' => true,
),
]);
echo $response->getBody();
const response = await fetch('https://rsflowhub.com/api/v1/ai/pii-redaction', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': 'rfh_your_api_key'
},
body: JSON.stringify({"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})
});
const data = await response.json();
console.log(data);
import requests
url = "https://rsflowhub.com/api/v1/ai/pii-redaction"
headers = {
"Content-Type": "application/json",
"X-API-Key": "rfh_your_api_key"
}
payload = {"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 = requests.post(url, json=payload, headers=headers)
print(response.json())
Every RSFlowHub endpoint uses the same envelope, so one parser handles all of them. Failed calls are not charged.
{
"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"
}
}
{
"success": false,
"request_id": "req_8c1d4e2a-7f3b-4a9c",
"error": {
"code": "VALIDATION_ERROR",
"message": "The given data was invalid.",
"details": {
"text": [
"This field is required."
]
}
},
"meta": {
"version": "v1",
"timestamp": "2026-10-05T09:30:00Z"
}
}
| Field | Type | Meaning |
|---|---|---|
success | boolean | true when the call worked, false on any error. |
request_id | string | Unique id for this call. Quote it when you contact support. |
data.result | object | The result of this endpoint (see the example). |
error | object | Only on failure: code, message and details per field. |
meta | object | API version and server timestamp. |
All error codes: Errors reference
Detects names, emails, phone numbers, SSNs, credit cards, IP addresses, and physical addresses.
Replace sensitive tokens with category placeholders (e.g. [NAME], [EMAIL]), asterisks, or cryptographic hashes.
Returns structured JSON detailing detected entity types, character offsets, and confidence scores.
Processed in memory over encrypted TLS 1.3 channels. Never logged or used for public AI training.
How teams use the Sensitive Data & PII Redaction API in production.
Scrub sensitive customer PII from raw logs before sending data to third-party AI models or fine-tuning datasets.
Customer [NAME] (email: [EMAIL], SSN: [SSN]) requested account deletion.Prevents accidental data leaks and ensures compliance.
Mask credit card numbers and phone numbers in live chat transcripts before archiving to database.
My card number is [CREDIT_CARD] and phone is [PHONE_NUMBER].Achieves PCI-DSS and GDPR compliance for support logs.
Anonymize medical notes and legal intake forms prior to internal research and analysis.
Patient [PATIENT_NAME] presented symptoms at [HOSPITAL] on [DATE].Keeps personal data out of logs, tickets and analytics tools.
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
Keep conversation history useful for training and review without keeping raw contact details.
Send redacted chats to analytics, support tools or agencies.
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.
The same job done three ways.
| Topic | RSFlowHub API | Raw LLM prompts | Rules / regex |
|---|---|---|---|
| Output | Validated JSON fields | Free text you have to parse | Fixed patterns only |
| Setup | One POST request, no prompts | Write and maintain prompts and parsing | Write and maintain rule lists |
| Provider outage | Automatic fallback to a backup model | You build retries and a second vendor | Not applicable |
| Pricing | 1 credit per call, failed calls free | Per token, per vendor | Your own servers and upkeep |
| Understands context | Yes, AI model | Yes, AI model | No, keywords only |
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.
Flowy
AI assistant