v1/classify
Detect personal or sensitive information in a payload without modifying it. Use the body fields below to control which elements are reported. To redact rather than detect, use v1/scrub.
Detect personal or sensitive information within any given payload
Data you would like to classify
Hi, my name is John Doe, you can reach me on john.doe@gmail.comList of data elements to detect in the payload. If set to None, will detect all data elements Teleskope supports
200
400
POST /v1/classify HTTP/1.1
Host: api.scanner.demo-001.teleskope.ai
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 96
{
"content": "Hi, my name is John Doe, you can reach me on john.doe@gmail.com",
"filters": [
"text"
]
}{
"classifications": [
{
"index": 0,
"class": "given",
"category": [
"PROFILE"
],
"startChar": 8,
"charSize": 4,
"startByte": 8,
"byteSize": 4,
"version": 1
},
{
"index": 1,
"class": "family",
"category": [
"PROFILE"
],
"startChar": 13,
"charSize": 3,
"startByte": 13,
"byteSize": 3,
"version": 1
},
{
"index": 2,
"class": "email",
"category": [
"PROFILE"
],
"startChar": 20,
"charSize": 20,
"startByte": 20,
"byteSize": 20,
"version": 1
}
],
"ml_classifier_used": true,
"scanner_version": "stable-2026-08-03"
}Body options
content
string
Text to classify. Required.
filters
string[]
Allow-list of element labels to report. Omit to report every supported element.
excludeFilters
string[]
Deny-list of element labels to skip. Takes precedence over filters.
sensitivityLevels
string[]
Restrict results 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. Use for JSON payloads. The root must be an object; wrap a top-level array as {"items": [...]}.
Response fields
Each entry in classifications describes one detected element.
index
integer
Position of this result within classifications.
class
string
Element label, for example email. Use this value with filters and excludeFilters.
category
string[]
Categories the element belongs to.
startChar
integer
Character offset of the match within content.
charSize
integer
Length of the match in characters.
startByte
integer
Byte offset of the match within content.
byteSize
integer
Length of the match in bytes.
version
integer
Taxonomy version used for this result.
Use startChar and charSize in languages with character-indexed strings, and startByte and byteSize when slicing raw bytes. The two differ whenever the payload contains multi-byte characters.
The response also carries scanner_version, ml_classifier_used, and timing.
Earlier revisions of this page showed data_element, star_char, and char_size. The API has never emitted those names. Code written against them parses a valid response and finds nothing. Read class, startChar, and charSize.
Element labels
filters and excludeFilters accept element labels from the Entity Taxonomy.
Names and email addresses are medium tier. Setting sensitivityLevels to ["high", "critical"] alone excludes them; use ["medium", "high", "critical"] to cover everyday personal data.
Related
v1/classifyCollection — classify multiple values in one request.
v1/scrub — redact instead of detect.
Redaction Methodologies — how each redaction style transforms a detected value.
Last updated
Was this helpful?
