Protect text (mapping stays server-side)
protectRedacts patient identifiers and PII from text, replacing each distinct value with a labelled token. Returns protected text plus a session ID for controlled restoration.
Instructions
Redact patient identifiers and PII, replacing each distinct value with a labelled token ([NHS_NUMBER_1], [PATIENT_NAME_1], ...). The reversal mapping is kept privately inside the Redacta server and is NEVER included in this response — you receive only the protected text, an opaque session_id for later controlled restoration, a count of what was replaced, and a self-check of possible leftovers. Sessions expire automatically.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The text to protect. | |
| categories | No | Which pattern sets to apply. Defaults to clinical + general. 'clinical' = NHS/NI/DOB/MRN/postcode/SSN/ZIP/email/phone/names; 'general' = URLs, IPs, payment cards, IBANs, account numbers, vehicle regs; 'safeharbor' = strictest, HIPAA Safe Harbor — implies clinical + general and also removes ALL dates (not just DOB), ages, fax, licence, device-serial, VIN and health-plan numbers. |