# New Feature: Password-Protected PDF Generation


Hey everyone!

We've got a short but sweet one for you today. You've been asking for it, and we're happy to deliver: **you can now generate password-protected PDFs** with PDFMonkey.

No new setting to toggle. No template to reconfigure. No complex setup. Just one field in your API call, and your PDF is locked.

## How It Works

When you create a document through the [API](https://pdfmonkey.io/docs/api/documents/), you can pass a **`_password` field in the `meta` object**. That's it. PDFMonkey handles the rest.

Here's what it looks like:

```json5
{
  "document": {
    "document_template_id": "your-template-id",
    "payload": {
      "clientName": "Jane Doe",
      "contractId": "CTR-2026-042"
    },
    "meta": {
      "_filename": "contract-jane-doe.pdf",
      "_password": "s3cur3-p@ss!" // <-- That's the whole feature
    },
    "status": "pending"
  }
}
```

Yes, that's really all there is to it. We know, the complexity is overwhelming 😄

If you don't include `_password` in the meta, nothing changes: your PDF generates exactly as before, no password, no encryption. **It's opt-in, per document.**

The pattern is the same as [`_filename`](https://pdfmonkey.io/docs/generating-documents/custom-filename/): a special key in the `meta` object that tells PDFMonkey to do something extra during generation.

## What Happens Under the Hood

When `_password` is present, your PDF gets **encrypted with AES-256** after generation. The recipient needs the password you specified to open the document. Without it, the content stays locked.

A few things worth noting:

- **Any template works.** Code editor, Builder, existing templates, password protection works with all of them.
- **No configuration needed.** You don't need to enable anything on the template or your account.
- **It works with [all integrations](https://pdfmonkey.io/docs/integrations/).** Zapier, [Make](/integrations/make/), Workato, [n8n](/integrations/n8n/), [Bubble](/integrations/bubble/), [Glide](/integrations/glide/), direct API,anywhere you can set the `meta` field.
- **Per-document control.** One document can be password-protected while the next one isn't. Your call.
- **Available on [all plans](/pricing/).** Free plan included. No upgrade required.

## When to Use PDF Password Protection

This is useful whenever your generated documents contain **sensitive or confidential information**: contracts, financial reports, medical records, employee documents, legal paperwork. Basically, any PDF that shouldn't be freely readable by anyone who stumbles upon the file.

Think about it: you're generating invoices with banking details, salary slips with personal data, or NDAs with confidential terms. Now you can **protect your PDF documents with a unique password** and share them safely. PDF password protection is activated per document, so you stay in control.

## FAQ

<div class="not-prose my-8 border-t border-taupe-900/20">
    <details class="group border-b border-taupe-900/20" open>
      <summary class="flex cursor-pointer list-none items-baseline gap-4 py-5 font-display text-xl/tight after:ml-auto after:shrink-0 after:font-mono after:text-2xl after:leading-none after:text-teal-800 after:content-['+'] group-open:after:content-['–'] hover:text-teal-800 [&::-webkit-details-marker]:hidden">
        <i class="shrink-0 font-mono text-xs font-semibold tracking-widest text-taupe-900/75 uppercase not-italic">Q1</i>How do I password protect a PDF with an API?
      </summary>
      <div class="grid gap-3 pb-5.5 text-base/relaxed text-taupe-900/80 sm:pl-11 [&_a]:font-semibold [&_a]:underline [&_a]:decoration-pink-500 [&_a]:decoration-2 [&_a]:underline-offset-4 [&_code]:bg-teal-100 [&_code]:px-1"><p>Add <code>&quot;_password&quot;: &quot;your-password&quot;</code> to the <code>meta</code> object when creating a document through the <a href="https://pdfmonkey.io/docs/api/documents/">PDFMonkey API</a>. The generated PDF will be encrypted with AES-256 and require the password to open. No template changes or account configuration needed.</p>
      </div>
    </details>
    <details class="group border-b border-taupe-900/20" >
      <summary class="flex cursor-pointer list-none items-baseline gap-4 py-5 font-display text-xl/tight after:ml-auto after:shrink-0 after:font-mono after:text-2xl after:leading-none after:text-teal-800 after:content-['+'] group-open:after:content-['–'] hover:text-teal-800 [&::-webkit-details-marker]:hidden">
        <i class="shrink-0 font-mono text-xs font-semibold tracking-widest text-taupe-900/75 uppercase not-italic">Q2</i>Can I generate PDFs without a password?
      </summary>
      <div class="grid gap-3 pb-5.5 text-base/relaxed text-taupe-900/80 sm:pl-11 [&_a]:font-semibold [&_a]:underline [&_a]:decoration-pink-500 [&_a]:decoration-2 [&_a]:underline-offset-4 [&_code]:bg-teal-100 [&_code]:px-1"><p>Yes. If you don’t include the <code>_password</code> field in your meta, PDFs generate exactly as before: no encryption, no password. Password protection is entirely opt-in, per document.</p>
      </div>
    </details>
    <details class="group border-b border-taupe-900/20" >
      <summary class="flex cursor-pointer list-none items-baseline gap-4 py-5 font-display text-xl/tight after:ml-auto after:shrink-0 after:font-mono after:text-2xl after:leading-none after:text-teal-800 after:content-['+'] group-open:after:content-['–'] hover:text-teal-800 [&::-webkit-details-marker]:hidden">
        <i class="shrink-0 font-mono text-xs font-semibold tracking-widest text-taupe-900/75 uppercase not-italic">Q3</i>What encryption does PDFMonkey use for password-protected PDFs?
      </summary>
      <div class="grid gap-3 pb-5.5 text-base/relaxed text-taupe-900/80 sm:pl-11 [&_a]:font-semibold [&_a]:underline [&_a]:decoration-pink-500 [&_a]:decoration-2 [&_a]:underline-offset-4 [&_code]:bg-teal-100 [&_code]:px-1"><p>PDFMonkey uses <strong>AES-256 encryption</strong>, the same standard used by governments and financial institutions. The PDF is encrypted after generation, and the recipient needs the exact password you specified to open the document.</p>
      </div>
    </details>
    <details class="group border-b border-taupe-900/20" >
      <summary class="flex cursor-pointer list-none items-baseline gap-4 py-5 font-display text-xl/tight after:ml-auto after:shrink-0 after:font-mono after:text-2xl after:leading-none after:text-teal-800 after:content-['+'] group-open:after:content-['–'] hover:text-teal-800 [&::-webkit-details-marker]:hidden">
        <i class="shrink-0 font-mono text-xs font-semibold tracking-widest text-taupe-900/75 uppercase not-italic">Q4</i>Does password protection work with all integrations?
      </summary>
      <div class="grid gap-3 pb-5.5 text-base/relaxed text-taupe-900/80 sm:pl-11 [&_a]:font-semibold [&_a]:underline [&_a]:decoration-pink-500 [&_a]:decoration-2 [&_a]:underline-offset-4 [&_code]:bg-teal-100 [&_code]:px-1"><p>Yes. Password protection works with <a href="https://pdfmonkey.io/docs/integrations/">Zapier, Make, Workato, n8n, Bubble, Glide</a>, and direct API calls. Anywhere you can set the <code>meta</code> field, you can add a password. It also works with all template types: Code editor, Builder, and existing templates.</p>
      </div>
    </details>
</div>
<script type="application/ld+json">{"@context":"https://schema.org","@type":"FAQPage","mainEntity":[{"@type":"Question","acceptedAnswer":{"@type":"Answer","text":"Add \u0026quot;_password\u0026quot;: \u0026quot;your-password\u0026quot; to the meta object when creating a document through the PDFMonkey API. The generated PDF will be encrypted with AES-256 and require the password to open. No template changes or account configuration needed."},"name":"How do I password protect a PDF with an API?"},{"@type":"Question","acceptedAnswer":{"@type":"Answer","text":"Yes. If you don’t include the _password field in your meta, PDFs generate exactly as before: no encryption, no password. Password protection is entirely opt-in, per document."},"name":"Can I generate PDFs without a password?"},{"@type":"Question","acceptedAnswer":{"@type":"Answer","text":"PDFMonkey uses AES-256 encryption, the same standard used by governments and financial institutions. The PDF is encrypted after generation, and the recipient needs the exact password you specified to open the document."},"name":"What encryption does PDFMonkey use for password-protected PDFs?"},{"@type":"Question","acceptedAnswer":{"@type":"Answer","text":"Yes. Password protection works with Zapier, Make, Workato, n8n, Bubble, Glide, and direct API calls. Anywhere you can set the meta field, you can add a password. It also works with all template types: Code editor, Builder, and existing templates."},"name":"Does password protection work with all integrations?"}]}</script>


---

That's all there is to it. We wanted to keep this feature **as simple as the problem it solves**: you need a password on your PDF, you add one field, done.

Check out the [full documentation](https://pdfmonkey.io/docs/generating-documents/pdf-password-protection/) for details, and don't hesitate to [reach out](mailto:tinymonkey@pdfmonkey.io) if you have questions.

The PDFMonkey Team 🐒
