Skip to Content
API ReferenceOverview

API Reference

The Expunct API provides programmatic access to detect, redact, and manage personally identifiable information across text, files, and cloud storage.

Base URL

https://api.pii-redactor.dev/api/v1

All endpoints are relative to this base URL.

Authentication

Every request must include an API key in the X-API-Key header:

curl https://api.pii-redactor.dev/api/v1/health \ -H "X-API-Key: pk_live_your_key_here"

See Authentication for details on creating and managing keys.

Content Type

All request and response bodies use JSON:

Content-Type: application/json

File uploads use multipart/form-data where noted.

Tenant Scoping

All tenant-scoped endpoints accept an optional ?tenant_id=... query parameter. If omitted, the tenant associated with the API key is used.

Error Format

Errors return standard HTTP status codes with a JSON body:

{ "detail": "error message describing what went wrong" }
Status CodeMeaning
400Bad request — invalid parameters or body
401Unauthorized — missing or invalid API key
403Forbidden — insufficient permissions
404Not found — resource does not exist
409Conflict — resource already exists
422Validation error — request body failed validation
429Rate limit exceeded
500Internal server error

Rate Limits

Rate limits vary by plan and are enforced per API key:

PlanRequests per Minute
Free100
Pro1,000
EnterpriseUnlimited

When rate limited, the API returns 429 Too Many Requests with a Retry-After header indicating how many seconds to wait.

Pagination

List endpoints support pagination with limit and offset query parameters:

GET /jobs?limit=20&offset=40

The default limit is 50 and the maximum is 100.

Endpoint Categories

CategoryDescription
RedactionSynchronous text redaction and async file/URI redaction
JobsTrack and manage async redaction jobs
Batch ProcessingSubmit multiple files for redaction at once
PoliciesConfigure reusable redaction policies
Reviews (HITL)Human-in-the-loop review queue for findings
ConfigurationCustom recognizers, webhooks, allowlists/blocklists
ConnectorsCloud storage integrations (S3, GCS)
Billing & UsageSubscription management and usage tracking
Audit LogsActivity logs for compliance
API KeysCreate and manage API keys
PseudonymizationReverse pseudonymized values
Feature FlagsCheck and manage feature flags
HealthLiveness and readiness probes