Logo
POST /api/pdf/security/add

PDF Password API

Send a PDF URL and a password, and get back an encrypted PDF that asks for it before it opens. A second endpoint takes the password off again.

  • Free plan
  • No credit card

Request

curl -X POST https://apdf.io/api/pdf/security/add \
  -H "Authorization: Bearer TOKEN" \
  -d file="FILE_URL" \
  -d owner_password="OWNER_PASSWORD" \
  -d user_password="USER_PASSWORD"

Two passwords.
Two jobs.

The user password is what a reader types to open the file. The owner password is the master key that opens it as well.

Password
••••••
payslip.pdf
user_password optional

Asked for before the file opens

owner_password required

The master key: also opens the file

What happens to your PDF
Encryption
AES with a 256-bit key
Opening the file
User password or owner password
Owner password only
Opens without a prompt, stays encrypted
Removing
Either password unlocks the file
Wrong password
Rejected, no file is returned

Only for the right eyes.

Lock documents with personal data on the way out, and unlock the ones you receive before you process them.

Payslips and statements

Encrypt every payslip or account statement with a password only its recipient knows, before your app sends it by email.

Contracts and offers

Lock contracts, offers and NDAs before they leave your system, and share the password with the recipient on a second channel.

Health and HR records

Protect files with health, salary or other personal data, so an attachment forwarded by mistake stays closed to the wrong person.

Unlock for processing

Take the password off files you receive, so the next step in your pipeline can merge, compress or search them as usual.

Lock from anywhere.

Add or remove passwords right where your files pass. One account and one monthly allowance behind every route.

Your code

One authenticated POST from any language. Copy-paste samples in cURL, Node.js, Python and more.

POST /api/pdf/security/add
Open the endpoint docs
Zapier

Pick the action in any Zap and map files from earlier steps. No code and no servers to run.

Add PDF Password Remove PDF Password
Use it in Zapier
n8n

Add the Apdf node to any workflow, on n8n Cloud or self-hosted, and chain it with your automation.

Add PDF security Remove PDF security
Use it in n8n
AI agents

Let Claude, ChatGPT, Gemini or your own agent run it through the MCP server, on any paid plan.

add-pdf-security remove-pdf-security
See what agents can do

1,000 password operations
a month. Free.

Start on the free plan and move up only when your volume does — up to 1,000,000 operations a month on Business.

  • One call is one operation, however many pages.
  • Only calls that do the work are counted.
  • Hard limits, so no surprise overage charges.
Plan PDF operations / month
Hobby Free
$0 / month
1,000
Pro
$39–$99 / month
20,000 – 60,000
Business
$149–$899 / month
100,000 – 1,000,000

PDF passwords, answered

Not with this endpoint. The encrypted PDF keeps all permissions, so anyone who can open it can also print and copy it. Use the user password to control who opens it.
Only from files that open without one: those are unlocked without any password. A file that asks for a password before it opens needs its user or owner password.
Yes. Each call takes its own passwords, so you can lock every document with a different one, for example per recipient.
As a URL: Apdf downloads the file, up to 100 MB. In Zapier and n8n you can map the file from an earlier step instead.
The response contains a download URL that stays valid for 60 minutes. Store the file on your side if you need it longer.
After the API call

Your code made the PDF.
Then it went dark.

Opened, read, signed or ignored — you never see any of it. Send the PDFs you generate as personal links, and every open, page read, comment and signature comes back to your software as a webhook. Need it signed? Same link. Same account, same API key, one more call.

Your PDF, after sending Live
document:loaded CFO
page:read p4 · 38s
signature:signed 11:48

API · Webhook · MCP

Lock your next PDF
with one call.