API Documentation
Everything you need to integrate Zanitize into your applications
Authentication
All API requests require authentication using an API key. Include your key in the X-API-Key header:
HTTP Header
X-API-Key: your_api_key_hereSecurity Tip
Never expose your API key in client-side code. Always make API calls from your backend server.
Quick Start
Make your first API call in seconds:
curl -X POST https://api.zanitize.com/v1/obfuscate \
-H "Content-Type: application/json" \
-H "X-API-Key: your_api_key" \
-d '{
"content": "Contact John Smith at john@example.com",
"universe": "smurfs"
}'Response
{
"obfuscated_content": "Contact Papa Smurf at brainy@smurfvillage.com",
"session_id": "sess_abc123def456",
"entities_detected": [
{
"type": "PERSON",
"original": "John Smith",
"fictional_name": "Papa Smurf"
}
]
}Obfuscate Endpoint
POST
/v1/obfuscateReplace sensitive entities in text with fictional character names.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
content |
string | Yes | Text to obfuscate |
universe |
string | No | Character universe (default: "smurfs") |
session_id |
string | No | Existing session for consistent mappings |
categories |
array | No | Entity types: PERSON, EMAIL, PHONE, etc. |
Deobfuscate Endpoint
POST
/v1/deobfuscateRestore original data from obfuscated text.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
session_id |
string | Yes | Session ID from obfuscation |
content |
string | Yes | Obfuscated text to restore |