Documents
Every successful conversion creates a document. Documents can be listed, downloaded, and deleted via the API.
Endpoints
GET
/v1/documentsList documents (paginated). Query params: page, per_page (max 100).
GET
/v1/documents/:idGet document details and metadata. Includes a download_url path for downloading the PDF.
GET
/v1/documents/:id/downloadStream the PDF bytes. Increments the download counter. Returns 410 if the document has expired or the download limit has been reached.
DELETE
/v1/documents/:idSoft-delete a document. The PDF remains in storage for 30 days before permanent removal.
Document fields
| Field | Description |
|---|---|
id | Document ID |
conversion_id | The conversion that created this document |
file_size_bytes | PDF file size |
page_count | Number of pages |
is_hosted | Whether the document has a public download link |
public_token | Token for the hosted URL (/d/{token}) |
download_count | Number of times downloaded |
download_limit | Max downloads (null = unlimited) |
expires_at | Expiration timestamp (null = never) |
has_password | Whether a download password is required |
metadata | Custom metadata from the conversion request |