Skip to main content

Batch Tokenize Data

This API tokenizes multiple plaintext values using a single tokenization function in one request. The tokenization function is identified by its unique function_id, and the API returns the corresponding ciphertext for each plaintext.


Endpoint Details

URL /v1/tokenize/batch
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
{
"function_id": "dfae2591-01de-4beb-a8e2-f6c7ddf5f069",
"plaintexts": [
"member1@example.com",
"member2@example.com"
],
"tweak_hex": "302f511f27ee"
}

Parameters

ParameterTypeDescription
function_idUUIDUnique identifier of the tokenization function used to perform tokenization
plaintextsArrayList of plaintext values to be tokenized using the specified configuration
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
{
"results": [
{
"ciphertext": "ca7+mez@3v1pje3.jsw"
},
{
"ciphertext": "yhp9yu-@3v1pje3.jsw"
}
]
}

Field Descriptions

FieldTypeDescription
resultsArrayList of tokenization results in the same order as the input
ciphertextStringTokenized output generated from the corresponding plaintext

info
  • A valid Bearer Token is required to access this endpoint.
  • The function_id must refer to an existing tokenization function.
  • All plaintext values in a single request are tokenized using the same tokenization function.
  • The results array preserves the same order as the plaintexts provided in the request.
  • 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.