Skip to main content

Bulk Tokenize Data

This API tokenizes multiple plaintext values across one or more tokenization functions in a single request. Each tokenization function is identified by its unique function_id, and the API returns the corresponding ciphertext for every plaintext item.


Endpoint Details

URL /v1/tokenize/bulk
Method POST
Authorization Bearer Token

Request Headers

HeaderTypeDescription
Content-TypeStringMust be application/json

Request Body

Use the following format to make a request:

JSON Request
{
"data": [
{
"function_id": "dfae2591-01de-4beb-a8e2-f6c7ddf5f069",
"items": [
{
"plaintext": "member@example.com",
"tweak_hex": "1234abcd"
}
]
},
{
"function_id": "a6a47f65-ed08-4383-be09-ffee076d9458",
"items": [
{
"plaintext": "861234056789012",
"tweak_hex": ""
}
]
}
]
}

Parameters

ParameterTypeDescription
dataArrayList of tokenization requests grouped by tokenization function
function_idUUIDUnique identifier of the tokenization function used to perform tokenization
itemsArrayList of plaintext values to be tokenized using the specified configuration
plaintextStringPlaintext data to be tokenized
tweak_hexStringTweak value in hexadecimal format, required when the configuration uses the Supplied tweak type

Response

Here is an example response after the request has been successfully processed:

Response
{
"data": [
{
"function_id": "dfae2591-01de-4beb-a8e2-f6c7ddf5f069",
"items": [
{
"plaintext": "member@example.com",
"ciphertext": "%tz5lx@bmb2dkr.hhr"
}
]
},
{
"function_id": "a6a47f65-ed08-4383-be09-ffee076d9458",
"items": [
{
"plaintext": "861234056789012",
"ciphertext": "588086082643540",
"tweak_hex": "302f511f2714ee"
}
]
}
]
}

Field Descriptions

FieldTypeDescription
dataArrayList of tokenization results grouped by tokenization function
function_idUUIDUnique identifier of the tokenization function used
itemsArrayList of tokenization results
plaintextStringOriginal plaintext provided in the request
ciphertextStringTokenized output generated from the corresponding plaintext
tweak_hexStringTweak value generated for the item when the configuration uses the Generated tweak type

info
  • A valid Bearer Token is required to access this endpoint.
  • Each function_id must refer to an existing tokenization function.
  • A single request can include multiple tokenization functions, each containing one or more plaintext values to tokenize.
  • tweak_hex is 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_hex value must be at least 8 characters (hex).
  • For more details on tweak types, refer to the User Guide.