v0.0.5

Data Detector API

PII detection, validation, masking, and fake-replacement. Detect personal information across Korean, Chinese, Japanese, and English text.

Base URL
click to copy
1

Get an API key

POST to /api/auth/issue with your admin token and a system name identifying your service.

2

Store the key

The response contains a signed API key (dd_...). Store it securely — it cannot be retrieved again.

3

Authenticate requests

Pass the key in every request: Authorization: Bearer dd_...

POST /api/auth/issue Issue API key
Request
{
  "token": "your-admin-token",
  "system": "billing-service"
}
Response
{
  "api_key": "dd_c2eca8ea...",
  "system": "billing-service",
  "message": "Store this key securely."
}
POST /api/detect Detect PII
Request
{
  "text": "Email me at test@example.com",
  "namespaces": ["comm", "us"]  // optional
}
Response
{
  "pii_found": true,
  "match_count": 1,
  "matches": [
    { "ns_id": "comm/email_01", "category": "email",
      "start": 12, "end": 28, "severity": "medium" }
  ]
}
POST /api/validate Validate against pattern
Request
{
  "text": "010-1234-5678",
  "ns_id": "kr/mobile_01"
}
Response
{
  "ok": true,
  "ns_id": "kr/mobile_01"
}
POST /api/mask Mask PII
Request
{
  "text": "Call 010-1234-5678 or test@example.com"
}
Response
{
  "original": "Call 010-1234-5678 or test@example.com",
  "masked":   "Call **-****-**** or ***@***.***",
  "change_count": 2,
  "changes": [ ... detail per match ]
}
POST /api/fake Replace with fake data
Request
{
  "text": "SSN: 123-45-6789",
  "namespaces": ["us"]
}
Response
{
  "original": "SSN: 123-45-6789",
  "replaced": "SSN: 018-15-8567",
  "change_count": 1,
  "changes": [ ... detail per match ]
}
GET /api/logs Usage logs
Query Parameters
system=billing-service  // filter by system
event=api_call          // token_issued | api_call
limit=50                // max entries (default 100)
Response
{
  "logs": [
    { "event": "api_call", "system": "billing-service",
      "endpoint": "/api/mask",
      "detail": { "change_count": 3 },
      "timestamp": "2026-02-21T05:47:04Z" }
  ],
  "total": 1
}
Response will appear here...