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
| Header | Type | Description |
|---|---|---|
| Content-Type | String | Must 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
| Parameter | Type | Description |
|---|---|---|
| data | Array | List of encryption requests grouped by encryption configuration |
| function_id | UUID | Unique identifier of the encryption configuration used to perform encryption |
| items | Array | List of plaintext values to be encrypted using the specified encryption configuration |
| plaintext | String | Plaintext 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
| Field | Type | Description |
|---|---|---|
| security_config_id | UUID | Unique identifier of the encryption configuration used to encrypt the data |
| security_config_type | Integer | Type of the security configuration |
| items | Array | List of encryption results |
| plaintext | String | Original plaintext provided in the request |
| ciphertext | String | Encrypted output generated from the corresponding plaintext |
info
- A valid Bearer Token is required to access this endpoint.
- Each
function_idmust refer to an existing encryption configuration. - The
security_config_typefield indicates the type of security configuration used:1= Encryption2= Tokenization3= Masking
- A single request can include multiple encryption configurations, each containing one or more plaintext values to encrypt.
- The returned
ciphertextvalues should be preserved exactly as received because they are required for the corresponding decryption operation.