Loading
Loading
Apply permission restrictions on a PDF file, such as disabling printing, copying, or editing.
The PDF Restrict API lets you control what end users can do with your PDF. Apply granular restrictions like disabling printing, preventing content copying, blocking edits, and more. Supports both user and owner passwords.
Pass your API key as the apiKey parameter in every request.
This is version v1.0 of the API.
The following parameters can be used in your API requests. File upload and webhook parameters are passed as multipart form data and query parameters.
file_idoptionalStringThe unique ID of a file already present on our server. Use PDF Files API to see your files. Check file metadata using File Status API
destroyoptionalBooleandefault: falseSet to true if you want to permanently delete the original file after processing.
restrictionsrequiredArrayA list of restrictions to apply. These define what the end user is not allowed to do with the PDF. See available restrictions below table.
user_passwordrequiredStringSets the password users will use to open the PDF. Password must be between 6 and 128 characters. If not set, only owner password will be set and anyone can open the PDF with the provided restrictions enabled.
owner_passwordoptionalStringSets the password that allows full access (e.g., removing restrictions). If not provided, user_password (if set) is used as the owner password. Password must be between 6 and 128 characters.
file_passwordoptionalStringPassword to unlock the input file if it is already secured. Provide the owner password if available, otherwise the user password. Owner password takes precedence.
outputoptionalStringOptionally specify a custom name for the output file (without extension).
webhook_urloptionalStringProvide a URL to receive a webhook notification when the task is completed. The notification will include the task status and file ID(s) of the output.
webhook_failure_notificationoptionalBooleandefault: falseIf true, we'll send an email notification if the webhook request fails after 3 retries. The email goes to the requesting user or their org admin if user is part of an organization.
Pass one or more restriction values via the restrictions query parameter.
| Restriction | Description |
|---|---|
| print_high | Disables high-quality printing. |
| print_low | Disables low-resolution printing. |
| edit_document_assembly | Prevents reordering or inserting pages. |
| fill_form_fields | Disallows filling in PDF form fields. |
| edit_annotations | Disables adding or modifying annotations or comments. |
| modify_content | Prevents modifying existing content in the PDF. |
| copy_and_extract_content | Disables copying text or images from the PDF. |
| use_accessibility | Prevents screen readers or accessibility tools from accessing content. |
Optional custom headers for webhook authorization.
X-Webhook-AuthorizationoptionalStringCustom authorization header sent with the webhook request. Format: Key:Value (e.g., Authorization:Bearer token123).
A successful request returns a 200 OK response with a JSON object containing the task ID and input file IDs.
taskIdUnique identifier for the PDF task, used to check status.
inputIdsArray of file IDs referencing input files used for the task. Not returned when destroy=true.
The API uses standard HTTP status codes to indicate the success or failure of requests. For common status codes like 429 (Too Many Requests), refer to the general API documentation.
Please provide either a file or a file ID.
Please provide a valid file ID
Please provide a strong password. Refer to the documentation for password requirements.
The provided file type is not supported. Refer to the documentation for valid file types.