Quickstart
This walks the full roundtrip with curl. You need an API key
and a PDF. Export the key first:
export ACCESSFUL_API_KEY="ak_your_key_here"export BASE="https://api.accessful.de/api/v1/upload-service"-
Upload the PDF. Send it as multipart form field
files:Terminal window curl -X POST "$BASE/pdf/upload" \-H "X-API-Key: $ACCESSFUL_API_KEY" \-F "files=@document.pdf"The response lists one
caseIdper accepted file:{"successfulUploads": ["7c2f1e4a-9b0d-4a1e-8f3c-2d6b5a9e1c40"],"duplicateFiles": [],"message": "Upload completed successfully. Uploaded 1 files. 0 duplicates found.","callbackUrl": null} -
Poll the job status with that
caseIduntil it iscompleted:Terminal window curl "$BASE/job-status/7c2f1e4a-9b0d-4a1e-8f3c-2d6b5a9e1c40" \-H "X-API-Key: $ACCESSFUL_API_KEY"{ "jobStatus": "completed", "stage": "finished", "score": 87 }scoreis the accessibility quality of the result (0–100). See alljobStatusvalues. -
Download the converted PDF/UA:
Terminal window curl -L "$BASE/download/7c2f1e4a-9b0d-4a1e-8f3c-2d6b5a9e1c40" \-H "X-API-Key: $ACCESSFUL_API_KEY" \-o document-pdfua.pdf -
Delete the case when you no longer need it (optional, but recommended — this is a permanent purge):
Terminal window curl -X DELETE "$BASE/delete/7c2f1e4a-9b0d-4a1e-8f3c-2d6b5a9e1c40" \-H "X-API-Key: $ACCESSFUL_API_KEY"
Full example
Section titled “Full example”const BASE = 'https://api.accessful.de/api/v1/upload-service';const headers = { 'X-API-Key': process.env.ACCESSFUL_API_KEY };
// 1. Uploadconst form = new FormData();form.append('files', new Blob([await readFile('document.pdf')], { type: 'application/pdf' }), 'document.pdf');const up = await fetch(`${BASE}/pdf/upload`, { method: 'POST', headers, body: form });const { successfulUploads: [caseId] } = await up.json();
// 2. Poll until terminalconst terminal = new Set(['completed', 'failed', 'analyzer_failed', 'canceled', 'quota_exceeded']);let status;do { await new Promise((r) => setTimeout(r, 2000)); status = await (await fetch(`${BASE}/job-status/${caseId}`, { headers })).json();} while (!terminal.has(status.jobStatus));
if (status.jobStatus !== 'completed') throw new Error(`Job ${status.jobStatus}`);
// 3. Downloadconst pdf = await (await fetch(`${BASE}/download/${caseId}`, { headers })).arrayBuffer();await writeFile('document-pdfua.pdf', Buffer.from(pdf));console.log(`Done — score ${status.score}`);Prefer to click instead of type? Run the same flow in the browser on the Try it out page.