By George Curta · Last updated 2026-05-19
Powerful REST Interface
Integrate PII detection and anonymization into any application. Simple endpoints, comprehensive documentation, enterprise-ready.
Quick Start
Get started in minutes
Install our SDK and make your first call
- Install the SDK for your language
- Get your access token from the dashboard
- Make your first anonymization request
- Integrate into your application
// Analyze text for PII
const response = await fetch('https://anonym.legal/api/presidio/analyze', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
text: 'Contact John Smith at john.smith@company.com',
language: 'en'
})
});
const results = await response.json();
// Returns detected entities with positions and confidence scoresAvailable Endpoints
/api/presidio/analyzeAnalyze text to detect PII entities. Returns entity types, positions, and confidence scores.
View documentation →/api/presidio/anonymizeAnonymize detected PII using your chosen method. Returns anonymized text.
View documentation →/api/presidio/batchProcess multiple documents in a single request. Business plans support up to 50 documents per batch.
View documentation →/api/healthCheck service status and runtime health. No authentication required.
Public endpointService Features
JWT Authentication
Secure token-based authentication for every request
Rate Limiting
Fair rate limits with clear headers. Higher limits for enterprise
Code Examples
Ready-to-use examples in multiple programming languages
Endpoint Reference
Complete REST documentation. All endpoints require Bearer token authentication unless noted.
Authentication
Every request requires a Bearer token in the Authorization header. Get your access token from Settings → Developer Access in the web app.
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/jsonEndpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/presidio/analyze | Detect PII entities in text |
| POST | /api/presidio/anonymize | Anonymize detected PII entities |
| POST | /api/presidio/batch | Process multiple files in one request |
| GET | /api/presidio/entities | List supported entity types |
| GET | /api/health | Service health (no auth required) |
| GET | /api/presets | List saved presets |
| POST | /api/presets | Create a new preset |
| PUT | /api/presets/{id} | Update a preset |
| DELETE | /api/presets/{id} | Delete a preset |
| GET | /api/encryption-keys | List encryption key metadata |
| GET | /api/encryption-keys/{id} | Get key details (add ?includeKey=true for value) |
Request & Response Schemas
POST /api/presidio/analyze — Request
{
"text": "John Smith lives at 123 Main St. SSN: 123-45-6789",
"language": "en",
"entities": ["PERSON", "LOCATION", "US_SSN"],
"score_threshold": 0.5,
"ad_hoc_recognizers": [
{
"entity_type": "EMPLOYEE_ID",
"patterns": [{ "regex": "EMP-[0-9]{6}", "score": 0.9 }]
}
]
}POST /api/presidio/analyze — Response
{
"entities": [
{ "entity_type": "PERSON", "text": "John Smith", "start": 0, "end": 10, "score": 0.95 },
{ "entity_type": "LOCATION", "text": "123 Main St", "start": 20, "end": 31, "score": 0.87 },
{ "entity_type": "US_SSN", "text": "123-45-6789", "start": 38, "end": 49, "score": 0.99 }
],
"tokens_charged": 3,
"language": "en"
}POST /api/presidio/anonymize — Request with Operators
{
"text": "John Smith, SSN 123-45-6789, email john@example.com",
"language": "en",
"operators": {
"PERSON": { "type": "replace", "new_value": "<NAME>" },
"US_SSN": { "type": "mask", "chars_to_mask": 5, "from_end": false },
"EMAIL_ADDRESS": { "type": "hash", "hash_type": "SHA256" }
}
}POST /api/presidio/anonymize — Response
{
"anonymized_text": "<NAME>, SSN ***-**-6789, email a3f2b8c1d4e5f6...",
"entities_found": 3,
"tokens_charged": 5,
"replacements": [
{ "entity_type": "PERSON", "original": "John Smith", "replacement": "<NAME>" },
{ "entity_type": "US_SSN", "original": "123-45-6789", "replacement": "***-**-6789" },
{ "entity_type": "EMAIL_ADDRESS", "original": "john@example.com", "replacement": "a3f2b8c1..." }
]
}Operator Reference
Configure per-entity anonymization using the operators field. Each entity type can use a different operator.
| Operator | Description | Parameters | Example Output |
|---|---|---|---|
| replace | Replace with custom value or token | new_value (string, max 100 chars) | <PERSON_1> |
| redact | Permanently remove | None | [REDACTED] |
| hash | One-way hash | hash_type: SHA256 | SHA512 | a3f2b8c1... |
| encrypt | AES-256-GCM reversible encryption | key (16-32 chars) | ENC:base64... |
| mask | Partial character masking | chars_to_mask, masking_char, from_end | John **** |
| keep | Keep original (skip anonymization) | None | John Smith |
Rate Limits & Token Costs
| Plan | Monthly Tokens | Developer Access |
|---|---|---|
| Free | 200 | — |
| Basic | 1,000 | REST endpoints |
| Pro | 4,000 | REST endpoints + MCP Server |
| Business | 10,000 | REST endpoints + MCP Server + Priority |
Error Codes
| Code | Description | Response Format |
|---|---|---|
| 400 | Invalid request (missing text, bad parameters) | { "error": "Text is required" } |
| 401 | Missing or invalid API token | { "error": "Unauthorized" } |
| 403 | Feature not available on current plan | { "error": "Upgrade required" } |
| 429 | Token balance exhausted or rate limited | { "error": "Insufficient tokens", "details": {...} } |
| 500 | Internal server error | { "error": "Internal server error" } |
About this page
We update this page when our platform or the law changes.
Read our founder note for how we work.
Each change shows up in the timestamp at the top.
Related reading
- Common questions
- Glossary
- How tokens work
- Security posture
- Where we comply
- What we detect
- Case studies
- Release notes
We follow these rules
- GDPR (EU 2016/679).
- ISO/IEC 27001:2022.
- NIS2 (EU 2022/2555).
- HIPAA safe harbor under 45 CFR § 164.514(b)(2).
Our promise
We do not sell your data.
We do not train models on your text.
We store your files in Germany.
You can delete your account at any time.
You own your work.
Where we run
Our servers live in Falkenstein, Germany.
We use Hetzner. They hold ISO 27001 certification.
All data stays in the EU.
Backups run every day.
Need help?
Email support@anonym.legal.
We reply within one business day.
How we test
We run a full check suite on every release.
Each surface gets its own sweep script and report.
Human reviewers spot-check the output each week.
We track recall and precision on a labelled set.
Bad runs block the deploy.
What we never do
- We never sell your information to third parties.
- We never train models on what you upload.
- We never keep your work after you delete it.
- We never share keys with any outside firm.
- We never run ads inside the product.
Plans in plain words
We sell credits, not seats.
One credit covers one short job.
Long jobs use a few credits each.
You can top up at any time.
Unused credits roll over each month.
Read the plans page for current rates.
Who built this
A small team of engineers and lawyers built this.
We ship from Europe and work in the open.
Our founder note spells out why we started.
Where to start
- Open the web app and try a sample file.
- Learn how credits get counted.
- See current plans and limits.
- Meet the team behind the product.
How the parts fit
A browser add-on cleans text inside Chrome.
A Word plug-in handles drafts in Office.
A small desktop tool works on whole folders.
An agent protocol link feeds large models safely.
All four share one core engine and one rule set.
Words from our team
We started this work after a lunch about cookies.
One friend kept getting odd ads on her phone.
We asked why a court file leaked through a draft.
We sketched the first build on a napkin that week.
By month three we had a tiny demo for a friend.
She used it on her first case the next day.
Common questions we hear
Can the tool read scanned PDFs? Yes, with OCR.
Does it work on long files? Yes, in small chunks.
Can I roll my own rule set? Yes, save it as a preset.
Does it run offline? The desktop build runs offline.
Do you keep my files? No, the cloud build wipes after each run.
Will it learn from my work? No, we never train on inputs.
A short tour of the workflow
Upload a file or paste a snippet of prose.
Pick the entities you want gone from the draft.
Choose a method: replace, mask, hash, encrypt, or redact.
Press run and watch the side panel show each hit.
Skim the result and tweak any rule that misfired.
Save the cleaned file or send it to a teammate.