Password-protect a PDF
POST/pdf/protect
Encrypts a PDF with AES-256 into a new render (0.5 units on live keys; Starter plan and
above). user_password is needed to open the document; without it anyone can open it, but
the permissions still apply. permissions lists what readers may do: an empty list forbids
all four, and leaving it out allows all four. Send at least one of user_password,
owner_password and permissions (400 invalid_request otherwise). A source that is
encrypted already answers 422 source_encrypted. Protect last: an encrypted PDF cannot be
merged or watermarked afterwards. Needs render:create.
Request
Responses
- 200
- 429
- default
Protected render.
rate_limited: the workspace's bucket of the plan's requests per second is empty (Free test keys also have 30 a minute). The problem names the bucket's limit and its window_seconds. Retry after Retry-After seconds.
Response Headers
Seconds until a request is let through again.
Size of the workspace's request bucket: the plan's requests per second. Free test keys are also held to 30 requests a minute, and the headers then describe whichever bucket is closer to empty.
Requests left in the bucket.
Seconds until the bucket is full again.
Error (RFC 9457 problem details).