Documents

Every successful conversion creates a document. Documents can be listed, downloaded, and deleted via the API.

Endpoints

GET/v1/documents

List documents (paginated). Query params: page, per_page (max 100).

GET/v1/documents/:id

Get document details and metadata. Includes a download_url path for downloading the PDF.

GET/v1/documents/:id/download

Stream the PDF bytes. Increments the download counter. Returns 410 if the document has expired or the download limit has been reached.

DELETE/v1/documents/:id

Soft-delete a document. The PDF remains in storage for 30 days before permanent removal.

Document fields

FieldDescription
idDocument ID
conversion_idThe conversion that created this document
file_size_bytesPDF file size
page_countNumber of pages
is_hostedWhether the document has a public download link
public_tokenToken for the hosted URL (/d/{token})
download_countNumber of times downloaded
download_limitMax downloads (null = unlimited)
expires_atExpiration timestamp (null = never)
has_passwordWhether a download password is required
metadataCustom metadata from the conversion request
Documents - pdfRelay Docs | pdfRelay