How to upload a PDF and get a URL
PDFs move between forms, billing systems, support tickets, and automation tools. FilePost turns the uploaded document into a stable HTTPS URL so the rest of your system can reference it without managing object storage.
PDFs are served inline by FilePost, which makes the returned URL suitable for a browser preview as well as a normal link. Keep the original filename private by default or choose public filename mode when human-readable paths are useful.
Upload pdf files with FilePost
Use the authenticated FilePost upload API for pdf files. The endpoint returns a JSON object containing the public URL, file ID, size, content type, and filename mode.
curl -X POST https://upload.filepost.dev/v1/upload \
-H "X-API-Key: YOUR_API_KEY" \
-F "file=@invoice.pdf"
Example response
{
"url": "https://cdn.filepost.dev/file/…",
"file_id": "a1b2c3d4e5f6",
"name": "invoice.pdf",
"size": 84210,
"content_type": "application/pdf"
}
What to do with the returned URL
Save the URL in your database, put it behind a document link, or pass it to the next workflow step.
<a href="https://cdn.filepost.dev/file/…">Open the PDF</a>
Good uses for pdf to URL
- Invoice and report links
- Generated PDFs from SaaS applications
- Document attachments in automation workflows
Know the boundary
FilePost does not extract text, run OCR, redact pages, or convert documents to other formats. Add those processing steps before uploading or in a separate worker.
For the complete request and response contract, see the FilePost API documentation. You can also test the flow with the interactive upload on the homepage.