POST

Detect and mask PII (email, phone, IBAN, IP, credit card, SSN, URL) in text, with optional offsets. Local regex and NER

/v1/text/redact-pii

Web · regex-ner-local

Request → Response

Examples from schemas.json.

Requestapplication/json
POST /v1/text/redact-pii
Content-Type: application/json

{
  "text": "Hello, world!",
  "mask": "[REDACTED]",
  "return_offsets": false
}
Responseapplication/json
HTTP/1.1 200 OK
Content-Type: application/json

// Endpoint-specific body after 402 settlement

Overview

Detect and mask PII (email, phone, IBAN, IP, credit card, SSN, URL) in text, with optional offsets. Local regex and NER.

Request schema

Body: JSON · application/json

FieldTypeDescription
textstringrequired
entitiesarrayoptional
maskstringrequired
return_offsetsbooleanrequired
IMPLEMENTATION
curl -X POST https://api.tools402.dev/v1/text/redact-pii \
  -H "Content-Type: application/json" \
  -d '{
  "text": "Hello, world!",
  "mask": "[REDACTED]",
  "return_offsets": false
}'

402 payment flow omitted — see Integrations for settlement.