Guide / Privacy

Stop sending customer text to places that keep it

Logs outlive their purpose. Prompts travel further than you think. Redaction is the cheap control that makes both survivable.

Where the leak actually happens

  • Error logs that capture the request body.
  • Support tickets pasted into a model prompt.
  • Analytics events with a free-text field.
  • Third-party enrichment calls that echo the input back.

You rarely need the raw value after the request is served. You need to know it was there, and you need the record to remain joinable. That is what offsets and stable hashes give you.

The request

curl -s -X POST 'https://piishield.p.rapidapi.com/v1/scan' \
  -H 'Content-Type: application/json' \
  -H 'X-RapidAPI-Key: YOUR_KEY' \
  -H 'X-RapidAPI-Host: piishield.p.rapidapi.com' \
  -d '{"text":"Contact ayam@example.com or +44 7700 900123, card 4111 1111 1111 1111."}'

Findings carry positions and confidence

{
  "textLength": 70,
  "findings": [
    { "type": "EMAIL", "start": 8, "end": 24, "confidence": 0.99, "validator": "email-syntax" },
    { "type": "PHONE", "start": 28, "end": 43, "confidence": 0.9, "validator": "phone-shape" },
    { "type": "CREDIT_CARD", "start": 50, "end": 69, "confidence": 0.97, "validator": "luhn", "detail": "visa" }
  ],
  "counts": { "EMAIL": 1, "PHONE": 1, "CREDIT_CARD": 1 }
}

Which endpoint for which job

EndpointOutputUse when
POST /v1/scanfindings with offsets and validatorsyou want to review before changing anything
POST /v1/redactsame detection pass, replacements appliedshipping to a log or a model
POST /v1/profanityprofanity with obfuscation handlinguser generated content
POST /v1/spamweighted heuristic spam scorecontact forms and comments
POST /v1/moderationPII, profanity and spam in one calla single gate before publish
GET /v1/typesevery detector and its validatorbuilding a review UI

Why validators matter

Redaction styles

Styles are a parameter on /v1/redact, not separate endpoints. mask keeps the last keepLast characters, which is what a support agent needs to read a card back to a customer. label emits stable tokens like [EMAIL_1] so two occurrences of the same address share a token and a model can still follow the thread. hash emits the first eight hex characters of the value was SHA-256, plus a hash-to-count map, so records stay joinable without the raw value ever coming back.

A card number that fails Luhn is almost certainly not a card, and redacting it costs you real information. The card detector runs Luhn, the IBAN runs mod-97, and the response names the validator that fired so you can decide how strict to be.

Sending text to a model prompt has its own pattern: redacting before an LLM call covers labels, the restore map and what still leaks.

Where heuristics stop

  • Structured data (emails, cards, IBANs, IPs, tokens) is reliable and checksummed.
  • Names and addresses are shapes, not formats. They carry lower confidence deliberately.
  • Unusual formats will slip through. That is why every finding has an offset and a confidence: review the low-confidence band, and never treat one pass as a guarantee.

Try PII Shield

Pay as you go at $0.05 a call, no monthly minimum. or a monthly plan from $25 once the volume justifies it.

Open the listing on RapidAPI