Skip to main content

Bulk Encrypt Data

This API encrypts multiple plaintext values across one or more encryption configurations in a single request. Each encryption configuration is identified by its unique ID, and the API returns the corresponding ciphertext for every plaintext item.


Endpoint Details

URL /v1/crypto/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": "ab063593-5dd8-4b9c-a24b-fbd66190cc85",
"items": [
{
"plaintext": "jakarta"
},
{
"plaintext": "tangerang"
}
]
}
]
}

Parameters

ParameterTypeDescription
dataArrayList of encryption requests grouped by encryption configuration
function_idUUIDUnique identifier of the encryption configuration used to perform encryption
itemsArrayList of plaintext values to be encrypted using the specified encryption configuration
plaintextStringPlaintext data to be encrypted

Response

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

Response
{
"data": [
{
"security_config_id": "ab063593-5dd8-4b9c-a24b-fbd66190cc85",
"security_config_type": 1,
"items": [
{
"plaintext": "jakarta",
"ciphertext": "v1:7qMnVsYUWv8SG3FpxrLd0w3zNr3ATtWeUWdRmH7nXBUAS9A="
},
{
"plaintext": "tangerang",
"ciphertext": "v1:+ekQmVs1Dk2b01JI7BYb2RLBcB6y48gtE3LV8sNGVRCCrvuO4g=="
}
]
}
]
}

Field Descriptions

FieldTypeDescription
security_config_idUUIDUnique identifier of the encryption configuration used to encrypt the data
security_config_typeIntegerType of the security configuration
itemsArrayList of encryption results
plaintextStringOriginal plaintext provided in the request
ciphertextStringEncrypted output generated from the corresponding plaintext

info
  • A valid Bearer Token is required to access this endpoint.
  • Each function_id must refer to an existing encryption configuration.
  • The security_config_type field indicates the type of security configuration used:
    • 1 = Encryption
    • 2 = Tokenization
    • 3 = Masking
  • A single request can include multiple encryption configurations, each containing one or more plaintext values to encrypt.
  • The returned ciphertext values should be preserved exactly as received because they are required for the corresponding decryption operation.