Entity Types

Built-in PII categories and custom entities.

Built-in entity types

Savitar ships with 50+ built-in detectors covering names, contact info, financial identifiers, government IDs, network identifiers, and domain-specific markers (construction, agriculture, geospatial, HR/legal).

Use GET /entities to fetch the current list at runtime — it changes as new languages and patterns ship.

curl https://api.savitar.dev/v1/entities \
  -H "Authorization: Bearer $SAVITAR_API_KEY"

Custom patterns

Register regex-based detectors with optional context tokens and confidence scores. Custom and built-in entities can be mixed in a single redaction request.

curl https://api.savitar.dev/v1/patterns \
  -H "Authorization: Bearer $SAVITAR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "entity_type": "EMPLOYEE_ID",
    "label": "Employee ID",
    "unit": "hr_legal",
    "patterns": ["EMP-\\d{6}"],
    "context": ["badge", "employee"],
    "score": 0.85
  }'