Skip to main content

Batch Masking Data

This API masks multiple plaintext values using a single masking function in one request. The masking function is identified by its unique function_id, and the API returns the masked data for each plaintext.


Endpoint Details​

URL /v1/masking/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": "64c72efa-762d-424a-bd10-f54630976c42",
"plaintexts": [
"082167588218",
"kalimantan"
]
}

Parameters​

ParameterTypeDescription
function_idUUIDUnique identifier of the masking function used to perform masking
plaintextsArrayList of plaintext values to be masked using the specified masking function

Response​

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

Response
{
"masked_data": [
"08######8218",
"ka####ntan"
]
}

Field Descriptions​

FieldTypeDescription
masked_dataArrayList of masked results in the same order as the input plaintexts

info
  • A valid Bearer Token is required to access this endpoint.
  • The function_id must refer to an existing masking function.
  • All plaintext values in a single request are masked using the same masking function.
  • The masked_data array preserves the same order as the plaintexts provided in the request.