API documentation
Check and fix PDFs from your own systems: document management, CMS publishing workflows or nightly batches. Included from the Business plan; billed from the same page credits.
Last updated 2026-12-03
Authentication
Create a key in Dashboard → API. Send it as X-Api-Key: pdfa_live_… (or Authorization: Bearer …). Keys are shown once and stored hashed. Rate limit: 5 requests per second per key, bursts of 30. Base URL: https://pdfaccessibility.org. Machine-readable spec: openapi.yaml (OpenAPI 3.1).
1. Check a PDF
POST /v1/check with multipart field file, or JSON {"url"}. Checking is free. Returns 202 with the document; poll GET /v1/documents/{id} until status is checked. Add ?fix=true to fix automatically after the check.
curl -X POST https://pdfaccessibility.org/v1/check \
-H "X-Api-Key: $PDFA_KEY" \
-F "file=@budget.pdf"
# or check a public URL and fix automatically when the check finishes
curl -X POST "https://pdfaccessibility.org/v1/check?fix=true" \
-H "X-Api-Key: $PDFA_KEY" -H "Content-Type: application/json" \
-d '{"url":"https://example.gov/files/agenda.pdf"}'2. Fix it
POST /v1/fix with document_id and optional lang, title, ai (false = AI off), ocr, suffix. Uses one credit per page; returns 402 insufficient_credits with a quote if you're out. When status is fixed, links holds fixed_pdf, report_pdf and report_json.
curl -X POST https://pdfaccessibility.org/v1/fix \
-H "X-Api-Key: $PDFA_KEY" -H "Content-Type: application/json" \
-d '{"document_id":"d_abc123","lang":"en-US","ai":true}'
# poll until status is "fixed"
curl -H "X-Api-Key: $PDFA_KEY" https://pdfaccessibility.org/v1/documents/d_abc123
# download
curl -H "X-Api-Key: $PDFA_KEY" -o budget-accessible.pdf https://pdfaccessibility.org/v1/documents/d_abc123/fixed.pdfEndpoints
| Method and path | What it does |
|---|---|
POST /v1/check | Upload or fetch a PDF and check it (free) |
POST /v1/fix | Fix a checked document (uses page credits) |
GET /v1/documents/{id} | Status, scores, full check and fix results |
GET /v1/documents/{id}/fixed.pdf | Download the fixed PDF (also original.pdf, report.pdf, report.json) |
DELETE /v1/documents/{id} | Delete files and results now |
POST /v1/scans | Scan a website for PDFs: {"url": "example.gov"} |
GET /v1/scans/{id} | Scan progress and the PDF inventory |
GET /v1/account | Plan and page credits |
Webhooks
Add an HTTPS endpoint in Dashboard → API. Events: document.checked, document.fixed, document.failed, scan.completed. Each request carries X-PDFA-Signature: t=…,v1=…, an HMAC-SHA256 of t + "." + body with your webhook secret. We retry three times.
import crypto from "node:crypto";
// header: X-PDFA-Signature: t=1700000000,v1=<hex>
function verify(rawBody, header, secret) {
const parts = Object.fromEntries(header.split(",").map((p) => p.split("=")));
const mac = crypto.createHmac("sha256", secret).update(`${parts.t}.${rawBody}`).digest("hex");
return crypto.timingSafeEqual(Buffer.from(mac), Buffer.from(parts.v1)) &&
Math.abs(Date.now() / 1000 - Number(parts.t)) < 300;
}Errors
Errors return JSON {"error": {"code", "message", "data"}}. Codes: 401 unauthorized, 402 plan_required / insufficient_credits, 404 not_found, 409 not_ready, 413 file too large, 429 rate_limited.
WordPress and Drupal
Plugins that scan the media library and fix files in place are on the roadmap; they use this same API.