Checking authentication...

API Documentation

Sign in to access the full API documentation, code examples, and endpoint reference.

Sign In to View Docs

Don't have an account? Register for free

API Reference

Complete reference for the RedactiPHI de-identification API.

Base URL
https://api.redact.health/api/v1
Authentication: All API requests require an API key. Include it in the header as Authorization: Bearer YOUR_API_KEY or X-API-Key: YOUR_API_KEY.

Your API key: Loading...

De-identification

POST /deidentify De-identify text containing PHI
ParameterTypeDescription
textrequired string The clinical text to de-identify
policy string De-identification policy: "safe_harbor", "llm_safe", "analytics", "redact_all"
subject_id string Patient/subject ID for consistent tokenization across documents
document_id string Custom document ID (auto-generated if not provided)
# Using cURL
curl -X POST https://api.redact.health/api/v1/deidentify \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Patient John Smith, DOB 03/15/1980, MRN E1234567",
    "policy": "safe_harbor"
  }'
{
  "text": "Patient [NAM_a1b2c3d4e5f6], DOB [DAT_f6e5d4c3b2a1], MRN [ID_123456789abc]",
  "document_id": "doc_abc123xyz",
  "phi_found": 3,
  "phi_types": { "PATIENT_NAME": 1, "DATE": 1, "MRN": 1 },
  "processing_time_ms": 45.2
}
POST /batch/deidentify De-identify multiple texts in one request
ParameterTypeDescription
textsrequired array Array of objects with "text" and optional "policy", "subject_id"
{
  "texts": [
    { "text": "Patient John Smith visited today" },
    { "text": "Follow-up for Jane Doe on 01/15/2024" }
  ]
}

Re-identification

POST /reidentify Restore original PHI from tokens
ParameterTypeDescription
textrequired string De-identified text containing tokens
document_idrequired string Document ID from original de-identification
reason string Reason for re-identification (for audit logging)
{
  "text": "Patient John Smith, DOB 03/15/1980, MRN E1234567",
  "tokens_replaced": 3,
  "tokens_not_found": []
}

Inspection

POST /inspect Detect PHI without de-identifying
ParameterTypeDescription
textrequired string Text to inspect for PHI
{
  "entities": [
    { "type": "PATIENT_NAME", "text": "John Smith", "start": 8, "end": 18, "confidence": 0.95 }
  ],
  "phi_count": 1,
  "phi_types": { "PATIENT_NAME": 1 }
}

Audit Receipts

GET /receipts/{document_id} Get cryptographic audit receipt
ParameterTypeDescription
document_idrequired string The document ID
GET /receipts/{document_id}/verify Verify receipt authenticity

Returns verification status confirming the receipt has not been tampered with.

Policies

GET /policies List available de-identification policies
PolicyDescription
safe_harbor HIPAA Safe Harbor compliant - removes all 18 identifier types
llm_safe Optimized for LLM processing - tokenizes for re-identification
analytics Preserves some data utility - uses generalization where possible
redact_all Maximum privacy - replaces all PHI with [REDACTED]