Skip to main content
POST
Create token for sensitive data

Authorizations

X-Bunker-Token
string
header
required

API token for authentication

Body

application/json
tokentype
enum<string>
required

Type of token. Use creditcard for card numbers, which returns a Luhn-valid format-preserving token, or string (alias text) for any other value, which returns a UUID. Other types exist but do not scale and are not recommended.

Available options:
creditcard,
string,
text
record
string
required

The sensitive data to tokenize

unique
boolean

Whether to create a unique token for each request

slidingtime
string

Time period for token validity (e.g., '1d', '1h')

finaltime
string

Absolute expiration time for the token (Unix timestamp format)

tags

Tags for the token, an array or a comma-separated string. Lowercased, de-duplicated, must match ^[a-z0-9][a-z0-9._-]{0,49}$, at most 16. With unique, they are added to the tags an existing token already has.

request_metadata
object

Additional metadata for the request

Response

Token created successfully

status
string
Example:

"ok"

tokenbase
string

The created token

tokenuuid
string

UUID of the token