Skip to main content

Anonymize Text

Use the REST API to anonymize or pseudonymize plain text in a single request.

Authenticate every request with your API key. Credits are consumed when processing text — check pricing and usage in app.doccape.de.

Anonymize text

Call POST /external/v1/text to anonymize text, with or without pseudonyms.

Replace YOUR_API_KEY with your actual API key:

curl 'https://app.doccape.de/api/external/v1/text' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-d '{
"text": "test mit Herr Müller aus Berlin",
"textLabels": ["PER", "STR", "MAIL", "TEL"]
}'
note

Pseudonymization replaces PII with a unique identifier (e.g. PER-1). Anonymization replaces PII with a generic placeholder (e.g. ****). Control this with the usePseudonyms flag on the request.

Supported text labels

Use GET /external/v1/text-labels to list available text labels for your project.

Special case: OTH label

The OTH label detects PII that does not fit into other predefined categories.

caution

The OTH label is experimental. Detection quality can vary with context and data structure. Use it with caution when high accuracy is required.

Next steps