Download a PDF

Once a job is complete, you can either stream the file through PDFox (using your API key) or get a signed, credential-free download URL to share with users.

Stream via API key

GET /v1/generate/jobs/:jobId/file

The response is the raw PDF binary (Content-Type: application/pdf). Requires Authorization header. Use this when downloading server-side.

Signed download token

GET /v1/generate/jobs/:jobId/download

Returns a token and expiresIn (seconds). Append the token as a query parameter to the file URL. No Authorization header needed — safe to use in browser redirects or <a href> links.

Download tokens expire after 1 hour. Don't store them — fetch a fresh one when needed using your API key.

Webhook download URL

The webhook payload also includes a downloadUrl which is a pre-signed token URL valid for 1 hour — the same mechanism, just delivered automatically when the job completes.

# Stream the file directly (requires Authorization header)
curl https://api.pdfox.com/v1/generate/jobs/job_7c9d2e3f/file \
  -H "Authorization: Bearer pdfs_live_xxxx" \
  -o invoice.pdf