Guides / PDF

Protect PDF

POST /v1/pdf/protect  · 

Password-protect a PDF with AES-256 encryption; control print/modify/copy permissions.

Parameters

NameTypeDescription
filefile · requiredPDF to protect.
passwordstring · requiredUser password (min 4 chars).
ownerPasswordstring · optional
allowPrintboolean · optionalDefault true.
allowModifyboolean · optionalDefault false.
allowCopyboolean · optionalDefault true.

Example request

curl -X POST https://api.bigapi.dev/v1/pdf/protect -H 'Authorization: Bearer $KEY' -F 'file=@in.pdf' -F 'password=secret123' -o protected.pdf

Example response

HTTP/1.1 200 OK
Content-Type: application/pdf
X-BigAPI-Cost: 1

(encrypted PDF body)

Related guides