Obfuscate sensitive data in text
POST/api/v2/Anonymizer/obfuscate
Detects the requested categories in the text and returns the obfuscated text together with the detected entities (category, key, original value, original start/end positions and score). Positions always refer to the original text. When no categories are supplied, all supported categories are detected. When no vendor is supplied, the default one is used.
Request
Query Parameters
Use this param to override the culture of the response. Options: - en (default) - es
- application/json
Body
The text to obfuscate, plus the optional vendor to detect with and the categories to detect.
Array [
]
The vendor to detect with (e.g. OpenAIPrivacyFilter). Optional; when omitted, the default vendor is used.
The plain text to analyze and obfuscate.
Entity categories to detect and obfuscate (e.g. private_person). Optional; when omitted or empty,
all categories supported by the vendor are detected.
categoryOptions
object[]
nullable
Optional per-category overrides (key and/or threshold).
The category these overrides apply to (must also appear in the request's categories list).
Base key used to label detections of this category (e.g. Person yields Person-1).
When omitted, the uppercased category is used (e.g. PRIVATE_PERSON-1).
Confidence threshold in [0, 1]; detections below it are discarded. When omitted, the system default confidence threshold is used.
Responses
- 200
- 400
- 401
- 403
- 500
Returns the obfuscated text and the detected entities.
- text/plain
- application/json
- text/json
- Schema
- Example (from schema)
Schema
Array [
]
The input text with every detected entity replaced by its placeholder.
spans
object[]
nullable
The detected entities, in order of appearance. Empty when nothing was detected.
The detected entity category (e.g. private_person).
The indexed key identifying this detection (e.g. PRIVATE_PERSON-1).
The original matched value.
Inclusive start index of the match in the original text.
Exclusive end index of the match in the original text.
The confidence score used to decide the obfuscation.
The placeholder token that replaced the value in text.
The vendor that produced the result.
{
"text": "string",
"spans": [
{
"entity_group": "string",
"key": "string",
"word": "string",
"start": 0,
"end": 0,
"score": 0,
"placeholder": "string"
}
],
"provider": "string"
}
- Schema
- Example (from schema)
Schema
Array [
]
The input text with every detected entity replaced by its placeholder.
spans
object[]
nullable
The detected entities, in order of appearance. Empty when nothing was detected.
The detected entity category (e.g. private_person).
The indexed key identifying this detection (e.g. PRIVATE_PERSON-1).
The original matched value.
Inclusive start index of the match in the original text.
Exclusive end index of the match in the original text.
The confidence score used to decide the obfuscation.
The placeholder token that replaced the value in text.
The vendor that produced the result.
{
"text": "string",
"spans": [
{
"entity_group": "string",
"key": "string",
"word": "string",
"start": 0,
"end": 0,
"score": 0,
"placeholder": "string"
}
],
"provider": "string"
}
- Schema
- Example (from schema)
Schema
Array [
]
The input text with every detected entity replaced by its placeholder.
spans
object[]
nullable
The detected entities, in order of appearance. Empty when nothing was detected.
The detected entity category (e.g. private_person).
The indexed key identifying this detection (e.g. PRIVATE_PERSON-1).
The original matched value.
Inclusive start index of the match in the original text.
Exclusive end index of the match in the original text.
The confidence score used to decide the obfuscation.
The placeholder token that replaced the value in text.
The vendor that produced the result.
{
"text": "string",
"spans": [
{
"entity_group": "string",
"key": "string",
"word": "string",
"start": 0,
"end": 0,
"score": 0,
"placeholder": "string"
}
],
"provider": "string"
}
If the request validation fails (missing text, unsupported vendor or category, threshold out of range).
- application/json
- Schema
- Example (from schema)
Schema
- MOD1
- MOD2
Array [
]
Stable, machine-readable error code. Branch on this value, not on message.
Human-readable, localised summary of the error.
Link to the documentation section for this error code.
errors
object
nullable
Map of keys (an invalid request field or the rule that failed) to messages. Only present when the error has specific detail to report. Values are strings, except on input_validation_error, where each value is an array of messages for that field.
property name*
object
nullable
oneOf
string
string
{
"code": "string",
"message": "string",
"documentationUrl": "string",
"errors": {}
}
The user is unauthorized or the session expired
- application/json
- Schema
- Example (from schema)
Schema
Stable, machine-readable error code. Branch on this value, not on message.
Human-readable, localised summary of the error.
Link to the documentation section for this error code.
{
"code": "string",
"message": "string",
"documentationUrl": "string"
}
The user does not have permission
- application/json
- Schema
- Example (from schema)
Schema
Stable, machine-readable error code. Branch on this value, not on message.
Human-readable, localised summary of the error.
Link to the documentation section for this error code.
{
"code": "string",
"message": "string",
"documentationUrl": "string"
}
There was an unexpected error
- application/json
- Schema
- Example (from schema)
Schema
Stable, machine-readable error code. Branch on this value, not on message.
Human-readable, localised summary of the error.
Link to the documentation section for this error code.
{
"code": "string",
"message": "string",
"documentationUrl": "string"
}