Data Transform
Mask values keep-last API
Masks string values at the listed paths, keeping the last N characters visible (e.g. card numbers, emails) with a configurable mask char. Answers 'How do I mask a card/SSN keeping the last 4?', 'How do I partially redact values for display?'.
Price$0.02per request
MethodPOST
Route/v1/data-transform/mask-values
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
data-transformmaskredactpiiprivacylast4jsonwrangle
API URL
Integration docshttps://x402.hexl.dev/v1/data-transform/mask-valuesExample request
{
"object": {
"card": "4111111111111234"
},
"paths": [
"card"
],
"keepLast": 4
}Example response
{
"result": {
"card": "************1234"
},
"masked": [
"card"
]
}Input schema
{
"type": "object",
"required": [
"object",
"paths"
],
"properties": {
"object": {
"type": "object",
"examples": [
{
"card": "4111111111111234"
}
]
},
"paths": {
"type": "array",
"examples": [
[
"card"
]
]
},
"keepLast": {
"type": "number",
"examples": [
4
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}