Developers
Redaction API
Redact PDFs programmatically using the same secure pipeline as the web app: Azure OCR + PII detection + irreversible rasterized redaction.
Async jobs
Upload one or many PDFs, poll job status, then download redacted outputs.
PII controls
Choose PII categories per job and keep your user defaults in the dashboard.
Retention modes
Default no-retention for API workflows, with an optional “open in Studio” mode when you need review.
Concepts
The essentials: auth, retries, retention, and supported PII categories.
  • Auth: send your key in X-API-Key (keep keys server-side).
  • Idempotency: use X-Idempotency-Key when retrying POST /v1/jobs.
  • Retention: ephemeral deletes originals after processing; studio keeps originals + masks for Studio review.
  • Statuses: uploaded → analyzing → redacted (or error).
  • PII categories: Person, Email, PhoneNumber, Address, Organization, Date, IBAN, CreditCard.
Authentication
Use an API key for server-to-server calls. Do not put API keys in browsers or mobile apps.
Validate your key
curl -X GET \
  'https://api.redactpdf.ai/v1/me' \
  -H 'X-API-Key: YOUR_API_KEY'
Header: X-API-Key: YOUR_API_KEY
Security checklist
  • Store keys in your server environment (not in client code).
  • Use one key per environment (dev/staging/prod) to reduce blast radius.
  • Prefer short-lived workers and job queues for large batches.
  • Log request IDs (from error responses) for support/debugging.
Quickstart
Minimal examples to get started quickly.
Create a job
curl -X POST \
  'https://api.redactpdf.ai/v1/jobs' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -F 'files=@contract.pdf;type=application/pdf' \
  -F 'pii_categories=["Person","Email","PhoneNumber"]' \
  -F 'retention=ephemeral'
The API returns a job id immediately. Processing happens asynchronously.
Example response
{
  "job_id": "b3f2b2e0-6f30-4f3e-8a7b-2f2a20a7d91c",
  "status": "analyzing",
  "documents": [
    { "id": "7f4f4f85-6b7a-4f88-9a8a-7b9a6a2d2fd0", "status": "uploaded" }
  ]
}
Poll the job until status becomes “redacted”, then download outputs per document.
Error handling
Errors are JSON with a stable code. Treat quota and rate limits as actionable signals.
Common codes
  • quota_exceeded (HTTP 402): buy credits or upgrade.
  • rate_limited (HTTP 429): backoff and retry.
  • invalid_request (HTTP 400): fix parameters.
  • unauthorized (HTTP 401): key missing/invalid.
Example error response
{
  "error": "Insufficient quota",
  "code": "quota_exceeded",
  "request_id": "req_123"
}
The request_id helps correlate logs and support requests.
PII categories
Choose which PII types to redact per job. If you omit categories, your dashboard defaults apply.
CategoryWhat it targets
PersonPeople names
EmailEmail addresses
PhoneNumberPhone numbers (validated patterns)
AddressPostal addresses
OrganizationCompany / organization names
DateDates and date-times
IBANInternational bank account numbers
CreditCardCredit card numbers
Tip: if you need a term to never be redacted, set excluded terms in the dashboard preferences.
API Reference (v1)
Practical request examples for the core endpoints. Download the OpenAPI file for the full schema.
Poll a job
curl -X GET \
  'https://api.redactpdf.ai/v1/jobs/b3f2b2e0-6f30-4f3e-8a7b-2f2a20a7d91c' \
  -H 'X-API-Key: YOUR_API_KEY'
Poll until the job reaches a terminal state (redacted or error).
Download output
curl -L \
  -H 'X-API-Key: YOUR_API_KEY' \
  'https://api.redactpdf.ai/v1/documents/7f4f4f85-6b7a-4f88-9a8a-7b9a6a2d2fd0/output' \
  -o contract-redacted.pdf
Download the redacted PDF once the document status is redacted.
Delete a job
curl -X DELETE \
  -H 'X-API-Key: YOUR_API_KEY' \
  'https://api.redactpdf.ai/v1/jobs/b3f2b2e0-6f30-4f3e-8a7b-2f2a20a7d91c'
Deletes the job and associated files (subject to retention).
Best practices
  • Use X-Idempotency-Key for retries (network timeouts happen).
  • Do not embed API keys in browsers or mobile apps. Call from your backend.
  • Use exponential backoff while polling; prefer 1–2s intervals for short jobs.
  • Treat 402 and 429 as actionable signals (quota / rate limit).
© Copyright 2026 Redact PDF AI. © 2025 Redact PDF AI.