Loading
Loading
Add password protection to a PDF file by encrypting it with user and owner passwords.
The PDF Encrypt API secures your PDF files with password-based encryption. Set a user password to restrict opening, and an owner password for full access control. Passwords must be between 6 and 128 characters.
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.
user_passwordrequiredStringSet user password for the PDF file. Password must be between 6 and 128 characters.
owner_passwordoptionalStringSet owner password for the PDF file. If not provided, user password will also be used as owner password. Password must be between 6 and 128 characters.
file_passwordoptionalStringPassword to unlock the input file if it's protected. Either the owner or user password can be provided. The 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.
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 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.