Operators
Operators control the replacement value for each detected entity. They do not change which entities are detected; they define what appears in the de-identified output after detection runs.
Configure operators per entity type with entity_config. Set DEFAULT to
choose the fallback operator for entity types that do not have their own rule.
| Operator | Best for |
|---|---|
type_numbered | Default readable placeholders such as [PERSON_1] |
constant | One fixed replacement string |
mask | Partial character masking |
hash | Deterministic, non-reversible replacements |
faker | Synthetic realistic values |
encrypt | Reversible encrypted replacements |
keep | Detect and ledger without changing text |
entity_type | Type labels without counters |
date_shift | Calendar-date shifting with intervals preserved |
Choose an operator
Section titled “Choose an operator”Use the operator that matches the output you need:
| Need | Operator |
|---|---|
| Readable output that still distinguishes entities | type_numbered |
| A simple redacted string for every replacement | constant |
| Partial visibility, such as preserving the last four digits | mask |
| Deterministic joins without displaying the original value | hash |
| Realistic-looking synthetic values | faker |
| Reversible de-identification for controlled workflows | encrypt |
| Detection results without changing the source text | keep |
Compact labels such as [PERSON] | entity_type |
| Shift dates while preserving intervals between dates | date_shift |
Configure an operator
Section titled “Configure an operator”OBJECT_CONSTRUCT( 'entity_config', OBJECT_CONSTRUCT( 'DEFAULT', OBJECT_CONSTRUCT('operator', 'type_numbered'), 'PHONE_NUMBER', OBJECT_CONSTRUCT('operator', 'mask'), 'DATE_TIME', OBJECT_CONSTRUCT( 'operator', 'date_shift', 'operator_params', OBJECT_CONSTRUCT('offset_days', 137) ) ))Self-hosted HTTP requests use the same structure as JSON object fields.
- Operators apply only to entities Agent Mask detects in the input.
- Entity-specific rules take precedence over
DEFAULT. - Put operator-specific settings inside
operator_params.