Supported Entities
pii_entities limits which categories Guardian Layer touches. Omit it (or pass
["ALL"]) to process everything detected.
| Entity | Covers | Example |
|---|---|---|
PERSON | People names and name-like references. | Dana Reyes, Dr. Emily Chen |
PHONE_NUMBER | Phone numbers. | 555-0100, +1 415 555 0123 |
EMAIL_ADDRESS | Email addresses. | alex@example.com |
LOCATION | Addresses, cities, regions, and location-like references. | 123 Market Street, Auckland |
DATE_TIME | Dates and time references. | March 3, 2026-06-04 |
ID_NUMBER | Account numbers, IDs, document numbers, and similar identifiers. | ACCT-8842, ID 123456 |
AGE | Age expressions. | 45 years old, aged 67 |
OCCUPATION | Job titles, professions, and role references. | nurse, Senior Manager, engineer |
ALL | All supported entity categories. | Use when you do not want to filter. |
Text Requests
For text endpoints, pass pii_entities as a JSON list:
{
"text": "Dr. Emily Chen called Alex at 555-0100.",
"domain": "General",
"masking_type": "redact",
"pii_entities": ["PERSON", "PHONE_NUMBER"]
}
TypeScript
await new GuardianLayer().deidentifyTextOutputs(
"Dr. Emily Chen called Alex at 555-0100.",
{ maskingType: "redact", piiEntities: ["PERSON", "PHONE_NUMBER"] },
);
Applies to both transform and redact, and to file methods.