curl -X POST https://YOUR_BLNK_INSTANCE_URL/identities/idt_1234567890/tokenize/email_address \ -H "X-Blnk-Key: YOUR_API_KEY"
{ "message": "Field tokenized successfully"}
Identities
Tokenize Field
Tokenize a specific field in an identity for PII protection
POST
/
identities
/
:id
/
tokenize
/
:field
curl -X POST https://YOUR_BLNK_INSTANCE_URL/identities/idt_1234567890/tokenize/email_address \ -H "X-Blnk-Key: YOUR_API_KEY"
{ "message": "Field tokenized successfully"}
Tokenizes a specific field in an identity record to protect personally identifiable information (PII). The field value is encrypted using format-preserving encryption, which maintains the same character types as the original value.
Blnk uses format-preserving tokenization (FPT) that maintains the character types of the original value:Original Value: john.doe@example.comTokenized Value: FPT:kpim.epz@fybmqnf.dpn:aGVsbG8gd29ybGQ=The tokenized value consists of:
Tokenization requires a 32-byte encryption key to be configured via BLNK_TOKENIZATION_SECRET environment variable or tokenization_secret in your blnk.json configuration file.
The encryption uses:
Algorithm: AES-256-GCM
Key derivation: HMAC-SHA256 for deterministic seeds
Uniqueness: Each tokenization produces a unique encrypted value
Tokenize Early: Tokenize PII as soon as it’s collected
Selective Tokenization: Only tokenize fields that contain sensitive data
Access Control: Limit access to detokenization endpoints
Audit Trail: Log all tokenization and detokenization operations
Key Management: Securely store and rotate encryption keys
Backup Keys: Ensure encryption keys are backed up securely
Important: Once a field is tokenized, the original value is encrypted and can only be retrieved using the detokenize endpoint. Ensure your encryption key is securely backed up.