Skip to main content
Databunker Pro provides two distinct tokenization engines, each designed for a different job:
  • PII tokenization (UserCreate / UserGet) — stores a complete user profile (JSON, N fields) as one encrypted record and returns a single UUID token representing the whole profile. Builds secure hashed search indexes over email, phone, login, and a custom field for efficient lookups. This is the user-table replacement pattern; see the PII Vault page for full detail.
  • Format-preserving tokenization (TokenCreate / TokenGet) — tokenizes individual sensitive values: a creditcard, which returns a Luhn-valid look-alike alongside a UUID, or a string, which returns a UUID. This is the PCI / single-value pattern, covered in the rest of this page.
Both engines share the same vault, encryption, multi-tenancy, and access-control layers — so the same auditability, key management, and CRBAC policies apply to either flow. Databunker Pro was built with the latest data privacy requirements in mind, such as data minimization, and is engineered to handle millions of data tokenization requests. The API supports bulk tokenization for efficient batch operations.

Supported data types

Two token types are recommended, and they cover almost every case: string is an alias for the canonical type name text; both are accepted and both store the value as text.
Other token types exist — unixtimestamp, uint32, uint64, email, ssn and uuid — but they are not recommended. The numeric types generate their format-preserving token by drawing a random value and rejecting collisions, and their keyspace is small. At hundreds of millions of records the generator spends longer and longer looking for a free value, until requests slow down or fail outright with Not enough random tokens. Use creditcard and string.

Key features

Automatic Expiration

In Databunker Pro, expiration allows you to set a lifespan for sensitive data tokens, ensuring they automatically expire after a defined period. Use slidingtime for a relative window (e.g. 30d, 1h) or finaltime for an absolute Unix-timestamp expiry.

Unique Record Support

This unique flag is used for data deduplication. It ensures that each record is saved only once, and the same token value is returned for identical records. If the original record has an expiration flag set, its expiration countdown will be reset from the beginning.

Dual Token Generation

By default, Databunker Pro generates two tokens: one in UUID format and another in a format-preserving manner.

Getting started

Output:

Bulk tokenization

For batch workloads — migrations, nightly imports, mass detokenization — Databunker Pro creates, reads, and deletes many tokens in a single call.

Create tokens in bulk

TokenCreateBulk takes an array of records and returns a token pair for each. slidingtime / finaltime and unique apply to the whole batch.
Output:

Tags

A token can carry tags that describe it, such as the application or data class it belongs to. Pass tags to TokenCreate, as an array or a comma-separated string:
In TokenCreateBulk, a top-level tags applies to every record, and a record can add its own tags. A record with invalid tags is reported in errors, and the rest of the batch is still created.
  • Rules: the same as for file tags. Tags are lowercased, de-duplicated and sorted, must match ^[a-z0-9][a-z0-9._-]{0,49}$, and a request carries at most 16.
  • With unique: when the value already has a token, the new tags are added to the ones it has. A call without tags leaves them unchanged.
  • TokenGet returns tags, an empty list when there are none.
  • Deleting a token with TokenDelete or BulkDeleteTokens removes its tags.
Keep tags few and stable: an application, a purpose, a data class. Never put a session ID, user ID or other per-record value in a tag. Tags are stored unencrypted so they can be indexed, and with unique they merge, so a per-request value would keep adding tags to the same shared token.
A policy can limit a role to tokens with certain tags. See Scoping token access by tag.

Change a token’s tags

token is the token UUID or the token value, such as a format-preserving credit card token. TokenAddTags and TokenDeleteTags take tags as an array or a comma-separated string. Each call returns the token’s tags afterwards, limited to the ones the caller may see.

Read and delete in bulk

Bulk read and delete return or destroy plaintext for many records at once, so they require a short-lived unlock UUID as an extra authorization step. Call BulkListUnlock first, then pass the returned unlockuuid to BulkListTokens or BulkDeleteTokens along with the tokens. BulkDeleteTokens accepts token UUIDs and format-preserving base tokens in the same list.

Compliance and scale

Format-preserving tokenization addresses three concerns at once:

Next steps