Supported Data TypesOverview

Supported Data Types

What data Protecto accepts, how entities, formats, and token types work together, and how to send values correctly.

This section defines what data Protecto accepts, what types of sensitive data it understands, and how masking behavior is controlled using entities, formats, and token types.

How to send values

Protecto APIs accept and return JSON.

RuleRequirement
Content typeapplication/json; charset=utf-8
Masking inputString values only
Batch operationsArrays of objects
Numeric valuesMust be sent as strings
Boolean valuesNot supported for masking

Even if your data is numeric (phone numbers, account numbers, IDs), always send it as a string. Leading zeros, spacing, and punctuation are preserved only when values are strings.

Entities, formats, and token types

Before choosing what fields to send, understand how these three concepts relate:

ConceptMeaningControls
Entity nameWhat the data isDetection engine or policy
Format nameHow the data looksExplicit input hint
Token type (token_name)How masked output is generatedExplicit input choice

You can let Protecto detect entities automatically, or override detection using format. Token generation is always controlled explicitly using token_name.

Rules of precedence

SituationBehavior
format providedFormat is trusted
No format, entity detectedDetected entity is used
Format and detection conflictFormat wins
Neither format nor detectionTreated as plain text

When detection is ambiguous (e.g., a value could be a passport number or an ID), provide format explicitly to ensure correct masking behavior.

Next steps