Skip to content

Quickstart

This walks the full roundtrip with curl. You need an API key and a PDF. Export the key first:

Terminal window
export ACCESSFUL_API_KEY="ak_your_key_here"
export BASE="https://api.accessful.de/api/v1/upload-service"
  1. Upload the PDF. Send it as multipart form field files:

    Terminal window
    curl --fail-with-body --silent --show-error \
    -X POST "$BASE/pdf/upload" \
    -H "X-API-Key: $ACCESSFUL_API_KEY" \
    -F "files=@document.pdf"

    The response lists one caseId per accepted file:

    {
    "successfulUploads": ["7c2f1e4a-9b0d-4a1e-8f3c-2d6b5a9e1c40"],
    "duplicateFiles": [],
    "message": "Upload completed successfully. Uploaded 1 files. 0 duplicates found.",
    "callbackUrl": null
    }
  2. Poll the job status with that caseId until it is completed:

    Terminal window
    curl --fail-with-body --silent --show-error \
    "$BASE/job-status/7c2f1e4a-9b0d-4a1e-8f3c-2d6b5a9e1c40" \
    -H "X-API-Key: $ACCESSFUL_API_KEY"
    { "jobStatus": "completed", "stage": "finished", "score": 87 }

    score is the accessibility quality of the result (0–100). See all jobStatus values.

  3. Download the converted PDF/UA:

    Terminal window
    curl --fail-with-body --silent --show-error --location \
    "$BASE/download/7c2f1e4a-9b0d-4a1e-8f3c-2d6b5a9e1c40" \
    -H "X-API-Key: $ACCESSFUL_API_KEY" \
    -o document-pdfua.pdf
  4. Delete the case when you no longer need it (optional, but recommended — this is a permanent purge):

    Terminal window
    curl --fail-with-body --silent --show-error \
    -X DELETE "$BASE/delete/7c2f1e4a-9b0d-4a1e-8f3c-2d6b5a9e1c40" \
    -H "X-API-Key: $ACCESSFUL_API_KEY"
#!/usr/bin/env bash
set -euo pipefail
# Requires curl and jq. Pass a PDF path as the first argument.
: "${ACCESSFUL_API_KEY:?Set ACCESSFUL_API_KEY first}"
BASE="https://api.accessful.de/api/v1/upload-service"
FILE="${1:-document.pdf}"
AUTH=(-H "X-API-Key: $ACCESSFUL_API_KEY")
upload=$(curl --fail-with-body --silent --show-error \
-X POST "$BASE/pdf/upload" \
"${AUTH[@]}" \
-F "files=@$FILE")
case_id=$(jq -er '.successfulUploads[0]' <<<"$upload")
echo "Uploaded: $case_id"
terminal='^(completed|failed|analyzer_failed|canceled|quota_exceeded)$'
while true; do
status_json=$(curl --fail-with-body --silent --show-error \
"$BASE/job-status/$case_id" "${AUTH[@]}")
status=$(jq -r '.jobStatus' <<<"$status_json")
echo "Status: $status"
[[ $status =~ $terminal ]] && break
sleep 2
done
if [[ $status != completed ]]; then
echo "Conversion ended with status: $status" >&2
exit 1
fi
curl --fail-with-body --silent --show-error --location \
"$BASE/download/$case_id" \
"${AUTH[@]}" \
--output document-pdfua.pdf
score=$(jq -r '.score // "n/a"' <<<"$status_json")
echo "Saved document-pdfua.pdf (score: $score)"

Prefer to click instead of type? Run the same flow in the browser on the Try it out page.