Mask with Attributes
Attach custom metadata key-value pairs to masked values for downstream tracking, auditing, or contextual reference.
{
"mask": [
{
"value": "https://platform.openai.com/playground/chat",
"format": "URL",
"token_name": "Text Token",
"attributes": {
"page_number": "1"
}
}
]
}
curl -X PUT https://protecto-trial.protecto.ai/api/vault/mask \
-H "Authorization: Bearer YOUR_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"mask": [
{
"value": "https://platform.openai.com/playground/chat",
"format": "URL",
"token_name": "Text Token",
"attributes": {
"page_number": "1"
}
}
]
}'
import requests
response = requests.put(
"https://protecto-trial.protecto.ai/api/vault/mask",
headers={
"Authorization": "Bearer YOUR_AUTH_TOKEN",
"Content-Type": "application/json"
},
json={
"mask": [
{
"value": "https://platform.openai.com/playground/chat",
"format": "URL",
"token_name": "Text Token",
"attributes": {"page_number": "1"}
}
]
}
)
{
"data": [
{
"value": "https://platform.openai.com/playground/chat?models=gpt-4o",
"format": "Url",
"attributes": {
"page_number": "1"
},
"token_name": "Text Token",
"token_value": "ooYxG://yFm3aGfq.AqfYIp.akT2Q/NBEjXBhtqL/HKdhW?Ke2LhD=vfXs1z"
}
],
"success": true,
"error": {
"message": ""
}
}
Attributes allow you to attach custom metadata to masked values. This is useful for associating contextual information — such as a page number, record ID, or source system — with each masked value.
Endpoint
| Method | Route | Headers |
|---|---|---|
| PUT | /api/vault/mask | {"Authorization": "Bearer <AUTH_TOKEN>"} |
To get the Authkey please contact help@protecto.ai
Request body
List of values to mask.
The raw sensitive value to mask.
The format to apply for structure-preserving masking.
The token type to use.
Arbitrary key-value metadata to attach to the masked value.
Notes
-
attributesis an object with string keys and string values. -
Attributes are stored alongside the token and can be used for downstream reference or auditing.
-
Attributes do not affect the masking output — they are metadata only.
Last updated 1 day ago
Built with Documentation.AI