PDFHQ logo

Documents

DocumentationDocuments & intelligence

Document Library API and secure workflow handoffs

Register owned sealed PDF uploads, inspect private metadata and activity, shorten retention, and reuse an existing upload in tasks, quoted AI jobs or sandbox signing drafts.

Server-side API keys Signed storage uploads

Register an existing, sealed PDF#

First upload directly to private storage with POST /v1/documents/uploads and POST /v1/documents/uploads/{upload_id}/complete. An upload is only usable after the server seals and verifies it. API keys are scoped to the original HQTools account and API project.

cURL
POST https://api.pdfhq.io/v1/workspace/documents
x-api-key: PROJECT_API_KEY
Content-Type: application/json

{"upload_id":"SEALED_UPLOAD_UUID","title":"Review draft"}

GET /v1/workspace/documents lists only available references. GET /v1/workspace/documents/{document_id} checks original upload ownership and expiry again. DELETE removes the library entry, not the underlying stored upload.

Private preview and retention#

cURL
GET https://api.pdfhq.io/v1/workspace/documents/DOCUMENT_UUID/preview-url
x-api-key: PROJECT_API_KEY

GET https://api.pdfhq.io/v1/workspace/documents/DOCUMENT_UUID/activity
x-api-key: PROJECT_API_KEY

The preview-url endpoint returns an authorized URL for private storage with a maximum 60-second lifetime, bounded by source and library retention. Treat its signed query as a secret and do not log or cache it. The deprecated preview endpoint is limited to 4 MiB and verifies the sealed source before returning bytes. GET activity records are limited to the same account and API project. PUT /retention can only shorten library availability; it cannot extend sealed-upload retention.

Handoff to PDF processing, AI Studio or signing#

cURL
POST https://api.pdfhq.io/v1/workspace/documents/DOCUMENT_UUID/handoff/task
x-api-key: PROJECT_API_KEY
Content-Type: application/json

{"task_id":"OWNED_TASK_UUID"}

POST https://api.pdfhq.io/v1/workspace/documents/DOCUMENT_UUID/handoff/ai
x-api-key: PROJECT_API_KEY
Idempotency-Key: NEW_IDEMPOTENCY_KEY
Content-Type: application/json

{"operation":"pdfhq.ai.summarize","quote_id":"OWNED_HQTOOLS_QUOTE","question":"Key risks?","allow_external_ai":true}

POST https://api.pdfhq.io/v1/workspace/documents/DOCUMENT_UUID/handoff/signing
x-api-key: PROJECT_API_KEY
Content-Type: application/json

{"provider":"managed","title":"Review agreement","subject":"Please review","signers":[{"name":"Sample Signer","email":"signer@example.com","order":0}]}

A task handoff does not create a charge. AI handoff enforces the regular priced quote, external-AI consent, project isolation and single-wallet HQ-credit admission. Signing creates a draft only: sending a sandbox request requires an independent explicit confirmation. Expired or foreign documents are never accepted.

PDFHQ logo

PDF tools and document intelligence. Prepare, understand and work with your documents.

© 2026 PDFHQ. All rights reserved.