More than one document / store: true, then GET /v1/documents
Store generated PDFs and fetch them later
Keeps a copy of the rendered document so it can be fetched again later, with a retention period that depends on the plan.
What it is for
Useful when the document has to be available after the request that made it: an invoice a customer can re-download, a report linked from an email, a receipt attached to a record. Without it the bytes exist once, in the response, and storing them is your problem.
The request
Sent to store: true, then GET /v1/documents. Everything else on this page is what happens around it.
# Store at render time.
curl -X POST https://api.pdfpipe.xyz/v1/pdf \
-H "Authorization: Bearer $PDFPIPE_KEY" \
-H "Content-Type: application/json" \
-d '{ "html": "<h1>Invoice</h1>", "store": true, "filename": "inv-0184.pdf" }'
# Later: list what is stored, or fetch one by id.
curl https://api.pdfpipe.xyz/v1/documents -H "Authorization: Bearer $PDFPIPE_KEY"
curl https://api.pdfpipe.xyz/v1/documents/doc_... -H "Authorization: Bearer $PDFPIPE_KEY" -o inv.pdfThe actual limits
Read from the implementation rather than remembered, so these are the numbers the API enforces rather than the ones a roadmap intends.
- Retention is one day on the free plan, thirty days on Starter, a year on Growth, and two years on Scale and above.
- An account-level auto-store setting stores every document without passing the flag on each call.
- Documents are scoped to the API key that created them, and fetching one with a different key returns 404 rather than 403, because the existence of the document is itself information.
- Fetching an expired document returns 410 rather than 404, so a caller can tell deletion from a wrong id.
What failure looks like
Passing store on a plan whose retention is zero returns 422 with storage_unavailable rather than storing silently for no time at all. Past the retention window the content is gone and no longer recoverable, so retention is a real deletion rather than a soft one.
Plan availability
Available on every plan including free, with one day of retention there. The difference between plans is how long the document lives, not whether it can be stored.
When this is the wrong tool
When you already have object storage and a lifecycle policy. Storing the response yourself means one retention policy rather than two, and it means the document lives in the same place as the record that refers to it. Storage here is a convenience, not a document management system.
Frequently asked
Is stored documents available on the free plan?
Available on every plan including free, with one day of retention there. The difference between plans is how long the document lives, not whether it can be stored.
Where do these numbers come from?
The running implementation. Every figure on this page, from payload ceilings to per-plan limits, is what the API enforces today rather than what a specification says it should. If one of them is wrong, the API is the thing to believe.
Related capabilities
Options that come up in the same request, and one from each of the other groups.
Render many PDFs in one API call
Up to several hundred documents in one request, each stored and returned as a link, with per-item success or failure rather than one all-or-nothing result.
Merge several PDFs into one over an API
Combines between two and twenty PDFs into a single file, taking each one as a stored document id, a public URL, or base64 in the request.
Render an HTML string to PDF over an API
Send a complete HTML document in the request body and get the PDF bytes back in the response.
Set the PDF page size in an API request
Six named paper sizes, passed in the request options, with A4 as the default when nothing is given.
Print background colours and images in a PDF
Controls whether background colours and images survive into the PDF. On by default here, which is the opposite of a browser's own default.
Password protect a generated PDF
Encrypts the output so a reader is asked for a password before the document opens.
Check API usage and remaining document quota
How many documents have been used this billing period, what the limit is, and what the plans are, all readable from the API rather than from a dashboard.
Everything the API does
The full list, grouped by which part of the request it belongs to.
API reference
The complete parameter documentation, including the parts with nothing interesting to say about them.
100 free documents a month, and a playground that runs a real render without a key.