Update Data Masking
This API updates the configuration of an existing masking function, including its name, description, masking settings, group assignment, and assigned users.
Endpoint Details
| URL | /v1/masking/functions/id |
| Method | PUT |
| Authorization | Bearer Token |
Request Headers
| Header | Type | Description |
|---|---|---|
| Content-Type | String | Must be application/json |
Request Path
To update an existing masking function, use the following request format:
/v1/masking/functions/4155dc15-a0a7-4b89-9fda-983beec2b077
Path Parameter
| Parameter | Type | Description |
|---|---|---|
| id | UUID | Unique identifier of the masking function to update |
Request Body
Use the following format to make a request:
JSON Request
{
"name": "dummy",
"description": "tes description",
"masking_character": "*",
"partial_masking_option": 2,
"mask_percentage": 0,
"masking_start_position": 0,
"masking_end_position": 0,
"allow_special_character": false,
"allow_white_space": false,
"group_id": "81ad4d05-d11a-4809-b1f2-cc000c086730",
"assigned_user_ids": [
"0a937c60-0ed4-4d06-870a-2e284b54287d"
]
}
Body Parameters
| Parameter | Type | Description |
|---|---|---|
| name | String | Updated name of the masking function |
| description | String | Optional description of the masking function |
| masking_character | String | Character used to mask the data |
| partial_masking_option | Integer | Position option used for partial masking |
| mask_percentage | Integer | Percentage of data to be masked, used for random masking |
| masking_start_position | Integer | Number of original characters shown at the beginning of the data |
| masking_end_position | Integer | Number of original characters shown at the end of the data |
| allow_special_character | Boolean | Indicates whether special characters are preserved from masking |
| allow_white_space | Boolean | Indicates whether white spaces are preserved from masking |
| group_id | UUID | Identifier of the group associated with the masking function |
| assigned_user_ids | Array | List of user IDs authorized to access the masking function |
Response
Here is an example response when the data is successfully updated:
Response
{
"function": {
"id": "4155dc15-a0a7-4b89-9fda-983beec2b077",
"tenant_id": "5ebde17c-01a1-4394-977b-9e611250cf5d",
"name": "Dummy",
"masking_character": "*",
"masking_type": 2,
"partial_masking_option": 2,
"group_id": "81ad4d05-d11a-4809-b1f2-cc000c086730",
"description": "tes description",
"created_by": "0a937c60-0ed4-4d06-870a-2e284b54287d",
"updated_by": "0a937c60-0ed4-4d06-870a-2e284b54287d",
"created_at": "2026-07-13T14:46:08+07:00",
"updated_at": "2026-07-13T15:04:01+07:00",
"assigned_user_ids": [
"0a937c60-0ed4-4d06-870a-2e284b54287d"
]
}
}
Field Descriptions
| Field | Type | Description |
|---|---|---|
| id | UUID | Unique identifier of the masking function |
| tenant_id | UUID | Identifier of the tenant that owns the masking function |
| name | String | Name of the masking function |
| masking_character | String | Character used to mask the data |
| masking_type | Integer | Type of masking applied by the function |
| partial_masking_option | Integer | Position option used for partial masking |
| group_id | UUID | Identifier of the associated group |
| description | String | Description of the masking function |
| created_by | UUID | Identifier of the user who created the function |
| updated_by | UUID | Identifier of the user who last updated the function |
| created_at | String | Creation timestamp in RFC 3339 date-time format |
| updated_at | String | Last update timestamp in RFC 3339 date-time format |
| assigned_user_ids | Array | List of user IDs assigned to the masking function |
info
- A valid Bearer Token is required to access this endpoint.
- The
idpath parameter must reference an existing masking function. - The
masking_typecannot be changed after the masking function is created. - Supported
partial_masking_optionvalues (used whenmasking_typeis2):1= Prefix2= Suffix
mask_percentageaccepts a value between 1 and 100 and is used for random masking.masking_start_positiondefines how many original characters are shown at the beginning of the data and is used for custom masking.masking_end_positiondefines how many original characters are shown at the end of the data and is used for custom masking.