PDF tools
Password-protect a PDF
Returns a copy of one PDF encrypted with AES-256. Set user_password (needed to open the PDF), owner_password with permissions (restrict printing, copying or editing), or both.
Send the PDF in the request (up to 4 MB), or upload it with /pdf/upload-url and pass its key as source_key (up to 150 MB and 5000 pages). Either way it is one request: there is no background job. Passwords are used to write the file and are never stored, logged or returned.
A PDF that is already protected is refused with 422 PDF_ENCRYPTED.
post/pdf/protect
Request
- Base URL: https://api.podpdf.com
- URL: https://api.podpdf.com/pdf/protect
- Auth: API key in header X-API-Key
Request body
Example request
{
"input": {
"filename": "contract.pdf"
},
"source_key": "pdf-uploads/01HZ…/01J8…pdf",
"filename": "board-pack.pdf"
}Response
The protected PDF, or JSON when store is true or the PDF was given by source_key
Example response
{
"job_id": "9f0a4b78-2c0c-4d14-9b8b-123456789abc",
"input_pages": 12,
"outputs": [
{
"name": "scan-001.pdf",
"pages": 3,
"page_range": "1-3",
"size_bytes": 91822
}
]
}Changes
No recorded changes to this operation across all 2 revisions of this API.