v1/scrub
Redact personal or sensitive information from a payload. Set the redaction style with the redactionStyle query parameter and control which elements are redacted with the body fields below.
Redact personal or sensitive information from any given payload
Redaction style applied to every match. Case-insensitive; an unrecognized value falls back to class. class (default) replaces with the entity label, e.g. . class_numbered uses numbered labels, e.g. <email_1>, and identical values share a number. empty drops the matched value. masked replaces characters with *. encrypted uses AES-SIV and is reversible; it requires the key parameter. tokenized produces format-preserving tokens for email, IPv4, IPv6, MAC, and phone; all other elements fall back to .
classPossible values: Encryption key used when redactionStyle=encrypted. Must be 32, 48, or 64 bytes. Required for encrypted, ignored otherwise.
Content you would like to scrub personal and sensitive information from
Hi, my name is John Doe, you can reach me on john.doe@gmail.comAllow-list of data element labels to redact. If omitted, every supported element is redacted.
Deny-list of data element labels to skip. Takes precedence over filters.
Enable ML-based detection in addition to rules. Defaults to true.
trueTreat content as a JSON string: classify only inside string values and preserve structure so the output still parses. Use for JSON payloads.
false200
400
POST /v1/scrub HTTP/1.1
Host: api.scanner.demo-001.teleskope.ai
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 183
{
"content": "Hi, my name is John Doe, you can reach me on john.doe@gmail.com",
"filters": [
"text"
],
"excludeFilters": [
"text"
],
"sensitivityLevels": [
"low"
],
"useML": true,
"treatAsJSON": false
}{
"content": "Hi, my name is <FIRST_NAME> <LAST_NAME>, you can reach me on <EMAIL>",
"classifications": [
{
"index": 0,
"class": "FIRST_NAME",
"startByte": 15,
"byteSize": 4,
"startChar": 15,
"charSize": 4,
"version": 2,
"category": [
"PERSONAL"
]
},
{
"index": 1,
"class": "LAST_NAME",
"startByte": 20,
"byteSize": 3,
"startChar": 20,
"charSize": 3,
"version": 2,
"category": [
"PERSONAL"
]
},
{
"index": 2,
"class": "EMAIL",
"startByte": 45,
"byteSize": 18,
"startChar": 45,
"charSize": 18,
"version": 2,
"category": [
"PERSONAL"
]
}
]
}Redaction styles
Set ?redactionStyle= on the request. The value is case-insensitive, and an unrecognized value falls back to class. See Redaction Methodologies for the underlying methods.
class
Replaces the value with its entity label, e.g. <EMAIL>. Default.
class_numbered
Numbered labels, e.g. <email_1>. Identical values share a number.
empty
Drops the matched value.
masked
Replaces characters with *.
encrypted
AES-SIV, reversible. Always pass a key (32, 48, or 64 bytes) — it is not enforced, and output produced without one cannot be decrypted.
tokenized
Format-preserving tokens for email, IPv4, IPv6, MAC, and phone. All other elements fall back to <CLASS>.
Body options
content
string
Text to scrub. Required.
filters
string[]
Allow-list of element labels to redact. Omit to redact every supported element.
excludeFilters
string[]
Deny-list of element labels to skip. Takes precedence over filters.
sensitivityLevels
string[]
Restrict redaction to these tiers: low, medium, high, critical. Elements with no assigned tier are always included.
useML
boolean
Enable ML-based detection in addition to rules. Defaults to true.
treatAsJSON
boolean
Treat content as a JSON string: classify only inside string values and preserve structure so the output still parses. Use for JSON payloads.
Last updated
Was this helpful?
