Developer API
PDFtoLink API Documentation
Upload PDF files, update file metadata, and retrieve share links from your own application. All examples use the public API base URL below.
https://pdftolink.app/apiAuthentication
Send the token in the Authorization header for every API request.
Authorization: Bearer <token>Upload file
POST /files/upload Upload a PDF with multipart/form-data. The response contains the share URL.
| Field | Required | Description |
|---|---|---|
| file | Yes | PDF file. The API validates the PDF signature and file type. |
| filename | No | Display filename. Defaults to the uploaded file name. Max 255 characters. |
| title | No | Public page title for the shared PDF. Max 160 characters. |
| desc | No | Public page description. You can also send description. Max 500 characters. |
| allowDownload | No | Boolean. Defaults to true. |
| searchEngineVisible | No | Boolean. Defaults to false. Use true to allow indexing. |
curl -X POST https://pdftolink.app/api/files/upload \
-H "Authorization: Bearer <token>" \
-F "[email protected]" \
-F "filename=annual-report.pdf" \
-F "title=Annual Report 2026" \
-F "desc=Board-approved annual report for public distribution." \
-F "allowDownload=true" \
-F "searchEngineVisible=true"{
"success": true,
"data": {
"id": "clx123",
"filename": "annual-report.pdf",
"title": "Annual Report 2026",
"desc": "Board-approved annual report for public distribution.",
"description": "Board-approved annual report for public distribution.",
"fileSize": 2481732,
"contentType": "application/pdf",
"allowDownload": true,
"searchEngineVisible": true,
"views": 0,
"shareUrl": "https://pdftolink.app/view/clx123",
"createdAt": "2026-06-29T15:00:00.000Z",
"updatedAt": "2026-06-29T15:00:00.000Z"
}
}Get file
GET /files/:idRetrieve metadata and the share URL for a file owned by the authenticated user.
curl https://pdftolink.app/api/files/<file-id> \
-H "Authorization: Bearer <token>"Update file
PUT /files/:id Update metadata with JSON, or send multipart/form-data to replace the PDF file at the same time. Empty title or desc values clear those fields.
curl -X PUT https://pdftolink.app/api/files/<file-id> \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"title": "Updated title",
"description": "Updated public description",
"allowDownload": false,
"searchEngineVisible": false
}'curl -X PUT https://pdftolink.app/api/files/<file-id> \
-H "Authorization: Bearer <token>" \
-F "[email protected]" \
-F "filename=replacement.pdf" \
-F "title=Replacement PDF"Response fields
Stable PDFtoLink file identifier. Use this value with GET or PUT requests.
The display filename associated with the shared PDF.
The public page title. If omitted, the viewer falls back to the filename.
The public page description. Both keys contain the same value for compatibility.
The public viewer URL that can be shared with readers.
Whether the viewer should expose a download action.
When true, the viewer page allows search indexing. When false, the page stays noindex.
ISO 8601 timestamps for file creation and the latest API update response.
Errors and limits
File type
Only PDF files are accepted. The API checks extension, content type, and PDF signature.
Upload size
The API rejects files over 100 MB. Account plan limits may apply before this hard cap.
Text fields
title accepts up to 160 characters. desc and description accept up to 500 characters.
Boolean values
Boolean fields accept true/false and common form values such as 1, 0, yes, no, on, and off.
Ownership
GET and PUT only return files owned by the authenticated user.
{
"success": false,
"error": "Invalid or missing API JWT token"
}