TypeScript SDK API - Documents

Documents

The Documents group manages PDF files and the AI fill pipeline. Upload a blank PDF to get a doc_id, trigger filling with a filled-info file, then poll until the filled PDF is ready to download.

6 endpointsBearer sk_live_xxxBase: /v1/sdk/docs
AuthAuthorization: Bearer sk_live_xxxxxxxxxxxxxxxx
AI fill workflow
1Upload blank PDF template - get doc_id
2Upload filled-info file to provide data
3Poll GET /result every 3-5 seconds until status is ready
4Download the filled PDF from the returned presigned URL

Upload document

Uploads a PDF to your developer storage. The returned doc_id is the identifier used in all subsequent operations. Currently supports PDF only. Max 10 MB. Must be sent as multipart/form-data.


Get document metadata

Retrieves metadata for a single document by its doc_id. Use this to check fill status and storage details before initiating a fill job.


Attach document to a session

Attaches a previously uploaded document to a chat session. Once attached, the AI uses the document as context for all subsequent messages in that session. You can attach multiple documents by calling this endpoint multiple times with differentdoc_id values.


Upload filled-info and trigger fill

Uploads a filled-info data file and immediately queues an AI fill job against an existing blank PDF. The job is asynchronous - this endpoint returns immediately. Poll GET /v1/sdk/docs/{pdfId}/result for completion.

Asynchronous - poll for completion
This endpoint returns as soon as the job is queued. Use GET /v1/sdk/docs/{pdfId}/result with a 3-5 second interval to check when status changes to ready.

Poll fill result

Polls the status of a fill job. The status field will be one of processing, ready, orfailed. When ready, a presigned urlto download the filled PDF is included. Links expire after 1 hour.


Delete document

Permanently deletes a document and its S3 storage object. This action cannot be undone. Any in-progress fill jobs referencing this document will fail.

Irreversible action
Deleting a document also removes its S3 object. In-progress fill jobs that reference this document will fail immediately. There is no soft delete or recovery option.

Next in SDK API Reference

Was this page helpful?
PDFFILLR.AI logo

PDFFILLR.AI

The intelligent layer for modern fund
administration. Automating high-stakes
documentation with precision and speed.

Powered byEngineersMind