Tokenize Data
This API tokenizes plaintext using an existing tokenization function. The tokenization function is identified by its unique ID, and the API returns the tokenized ciphertext.
Endpoint Details
| URL | /v1/tokenize |
| Method | POST |
| Authorization | Bearer Token |
Request Headers
| Header | Type | Description |
|---|---|---|
| Content-Type | String | Must be application/json |
Request Body
Use the following format to make a request:
JSON Request
{
"function_id": "dfae2591-01de-4beb-a8e2-f6c7ddf5f069",
"plaintext": "admin@example.com",
"tweak_hex": "abcd1234"
}
Parameters
| Parameter | Type | Description |
|---|---|---|
| function_id | UUID | Unique identifier of the tokenization function used to perform tokenization |
| plaintext | String | Plaintext data to be tokenized |
| tweak_hex | String | Tweak value in hexadecimal format, required when the tokenization function uses the Supplied tweak type |
Response
Here is an example response after the request has been successfully processed:
Response
{
"ciphertext": "rg6aj@glr3udv.fai"
}
Field Descriptions
| Field | Type | Description |
|---|---|---|
| ciphertext | String | Tokenized output generated from the provided plaintext using the specified tokenization function |
info
- A valid Bearer Token is required to access this endpoint.
- The
function_idmust refer to an existing tokenization function. tweak_hexis only required when the tokenization function uses the Supplied tweak type. It can be left empty for the Internal and Generated tweak types.- The
tweak_hexvalue must be at least 8 characters (hex). - For more details on tweak types, refer to the User Guide.