Direct PDF uploads
Secure presigned storage uploads, SHA-256 checksums, upload completion and expiry.
Document library#
After sealing an upload, register its upload_id and title with POST /v1/workspace/documents. The library stores an account and API key scoped reference, without copying the file or extending its original expiry.
List, rename and remove references under /v1/workspace/documents. Preview and activity endpoints recheck ownership and expiry. PUT / {document_id}/retention accepts a retained_until timestamp that can only shorten availability. Removing a reference leaves the original upload under its existing retention policy.
POST /{document_id}/handoff/task attaches the source to a task; /handoff/ai requires the normal quote, explicit external AI consent and Idempotency-Key; /handoff/signing creates a draft for separate review and send. OAuth requires files.read or files.write for library operations, jobs.write for task handoff, ai.write for AI handoff and signatures.write for signing handoff.
File admission#
Request a presigned upload using POST /v1/documents/uploads with filename, content_type=application/pdf, size_bytes, and the lowercase SHA-256 of the exact source bytes. The response contains an S3 POST URL and signed multipart form fields.
Send all returned fields unmodified and the file to the S3 URL. Then call POST /v1/documents/uploads/{upload_id}/complete to verify size and metadata and seal the object. Only ready uploads can be attached to tasks. Prefer POST /v1/tasks/{task_id}/uploads and the returned completion link to automatically attach the file.
curl -X POST https://api.pdfhq.io/v1/documents/uploads \
-H 'x-api-key: YOUR_API_KEY' -H 'Content-Type: application/json' \
-d '{"filename":"report.pdf","content_type":"application/pdf","size_bytes":12345,"sha256":"ACTUAL_64_CHAR_DIGEST"}'Privacy and limits#
A task upload may be attached to one task only. Upload tickets expire; size, PDF signature and digest must match. Do not persist signed URLs or log sensitive file content. Customers can delete unused uploads before they are submitted to a job.
