Prudai Developer API: anonymization
The operations of this part (Anonymization).
Base URL https://api.prudai.com/v1. Logging in is in Login, scopes in Scopes and permissions, errors in Errors. Overview.
| Method | Path | What it does | State |
|---|---|---|---|
POST | /v1/anonymization/analyze | Count what would be masked in a file (dry run of anonymizeDocument) | Coming soon |
POST | /v1/anonymization/document | Mask personal data in a file and get the masked copy (raw bytes) | Coming soon |
POST | /v1/anonymization/text | Mask personal data in a text | Coming soon |
Count what would be masked in a file (dry run of anonymizeDocument)
POST /v1/anonymization/analyze
Personal tokens only. Send one file (.pdf, .docx, .txt, .md or .eml) as multipart field file.
Returns per category how many personal data items would be masked; the values themselves are not returned.
Nothing is stored, shared or changed. Recognition runs in Prudai’s own anonymizer service (patterns with
checks, the organisation’s own reference patterns and learned terms, and named-entity recognition); no AI
pass and no other processor. An .eml is read as text (headers From/To/Cc/Subject/Date plus the text
parts); attachments are counted in eml.attachments_not_included and not read.
Categories (types, comma-separated; default the first eight): person, address (with postcode), bsn,
iban, email, phone, date_of_birth, reference (case and reference numbers), and on request
organization, kvk, license_plate, other, or all. accept=high (default) counts only findings with
high confidence; accept=all also the low ones.
This is an aid, not a guarantee: the copy is “gemaskeerd, controleer vóór gebruik”, not “AVG-anoniem”.
- State: coming soon, not in production yet.
- Scope:
prudai:anonymization:read - Approval:
none, no extra step.
Parameters
types
Comma-separated categories: person, address, bsn, iban, email, phone, date_of_birth, reference (default these eight), organization, kvk, license_plate, other, or all. max length 300acknowledge_untexted_pages
A scanned PDF page without text cannot be masked;truemasks the text pages anyway and leaves those pages as they are. One of:true,false
Body
Format: multipart/form-data.
Responses
| Status | Meaning |
|---|---|
200 | Counts per category. |
401 | Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment. |
403 | Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution). |
413 | The file exceeds the upload size limit (request_too_large). |
415 | Not a supported format (unsupported_format). |
422 | Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body). |
429 | Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded. |
503 | Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged. |
curl -s -X POST "https://api.prudai.com/v1/anonymization/analyze" \ -H "Authorization: Bearer $PRUDAI_TOKEN"prudai leo anonymization analyzeMask personal data in a file and get the masked copy (raw bytes)
POST /v1/anonymization/document
Personal tokens only. Same input and categories as analyzeAnonymization. Not the task envelope on
success: the body is the masked copy, Content-Type: application/octet-stream, Content-Disposition: attachment with the name <name>_geanonimiseerd.<ext>, Cache-Control: no-store, and the header
X-Prudai-Anonymization-Report: base64 of a JSON report (filename, replacements, counts_by_type,
distinct_values, residual_check, warnings, eml) without any found value. An .eml comes back as
a masked <name>.eml_geanonimiseerd.txt (headers and text parts; attachments are not included). Nothing is stored on our side;
the original and the copy stay with the caller. Errors are the normal envelope:
422 nothing_to_anonymize when nothing of the requested types was found (no copy is made),
422 untexted_pages style errors from the service for scanned PDF pages (pass
acknowledge_untexted_pages=true to mask the text pages anyway).
- State: coming soon, not in production yet.
- Scope:
prudai:anonymization:read - Approval:
none, no extra step.
Parameters
types
Comma-separated categories: person, address, bsn, iban, email, phone, date_of_birth, reference (default these eight), organization, kvk, license_plate, other, or all. max length 300acknowledge_untexted_pages
A scanned PDF page without text cannot be masked;truemasks the text pages anyway and leaves those pages as they are. One of:true,false
Body
Format: multipart/form-data.
Responses
| Status | Meaning |
|---|---|
200 | The masked copy. |
401 | Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment. |
403 | Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution). |
413 | The file exceeds the upload size limit (request_too_large). |
415 | Not a supported format (unsupported_format). |
422 | Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body). |
429 | Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded. |
503 | Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged. |
Response format: application/octet-stream.
curl -s -X POST "https://api.prudai.com/v1/anonymization/document" \ -H "Authorization: Bearer $PRUDAI_TOKEN"prudai leo anonymization documentMask personal data in a text
POST /v1/anonymization/text
Personal tokens only. Returns text with the personal data of the requested categories replaced by labels,
plus counts_by_type. Same recognition and categories as anonymizeDocument (own service, no AI pass, no
other processor). Nothing is stored. Up to 100,000 characters. Use this from an assistant (MCP) to mask a
passage before quoting or sharing it; for files use prudai anonymize <file>.
- State: coming soon, not in production yet.
- Scope:
prudai:anonymization:read - Approval:
none, no extra step.
Body
JSON, required.
textrequired
max length 100000types
Categories to mask; default the first eight. One of:person,address,bsn,iban,email,phone,date_of_birth,reference,organization,kvk,license_plate,other,allaccept
One of:high,all· default:"high"
Responses
| Status | Meaning |
|---|---|
200 | The masked text. |
401 | Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment. |
403 | Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution). |
422 | Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body). |
429 | Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded. |
503 | Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged. |
curl -s -X POST "https://api.prudai.com/v1/anonymization/text" \ -H "Authorization: Bearer $PRUDAI_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "text": "string", "types": [ "person" ], "accept": "high" }'prudai leo anonymization text