LogoLogo
HomePricingSign inRegister
  • PDFMonkey Documentation
  • Guides
    • From zero to generating your first Document
    • Generating your first Document with Zapier
    • Generating your first Document with Make
    • Making your first API call
  • PDFMonkey Features
    • 14-day Pro trial
    • Automatic deletion (TTL)
    • CLI
    • Generating images
    • Share links
    • Synchronous generation
    • Snippets
    • Webhooks
  • Frequent questions
    • Troubleshooting
      • My Document is blank
      • My data is not showing up in the Document
      • The Download URL is empty
    • What can you do with PDFMonkey?
    • What happens if I use all of my quota?
    • How do I change my password?
    • How do I delete my account?
    • Authoring Templates
      • Can I import an existing PDF or Word file in PDFMonkey?
      • What are the Template test data?
      • Can you create templates for me?
      • Can I display the number of the current page in the content?
      • Can I use links?
    • Privacy and security
      • What data do you keep and for how long?
      • How is my data secured?
      • Do you have a DPA
    • Compliance
  • How-tos
    • Adding a header or footer to your document
    • Including images in your documents
    • Styling your documents
      • Writing your own CSS
      • Using external libraries
      • Providing per-Document styles
      • Dealing with page breaks
    • Using different fonts
      • Handling special characters (UTF-8, Hebrew, Chinese, etc)
      • Using different fonts in header and footer
    • Using JavaScript
      • What are the available JavaScript features
      • JavaScript and Dynamic Data
      • Using external libraries
      • Displaying dates and time using JS
      • Including charts in your Documents
      • Debugging your JavaScript
    • Setting the filename of the generated Document
    • Changing the size of the page and its margins
    • Forcing a single page or use a full-page background
    • Using QR Codes
  • Integrations
    • List of integrations
    • Zapier
      • Generating your first Document with Zapier
      • Document generation options in Zapier
      • Reacting to generated documents in Zapier
      • TODO Retrieving a Document in Zapier
      • TODO Deleting a document using Zapier
      • Fixing frequent Zapier errors
    • Make (formerly Integromat)
      • Generating your first Document with Make
    • Workato
      • Generating a document with Workato
      • Deleting a document using Workato
      • Reacting to generated documents in Workato
    • Glide
    • Bubble
    • InvoiceBerry (via Zapier)
    • Ruby SDK
  • References
    • The Document Lifecycle
    • Liquid Reference
      • Introduction
      • Defining and using dynamic data
      • Variables
      • Naming variables
      • Conditions (if/else)
      • Iteration (dealing with lists)
      • Filters (data transformation)
        • Built-in filters
        • PDFMonkey filters
      • PDFMonkey Liquid tags
      • Whitespace control
    • API Reference
      • Documents
      • Templates
Powered by GitBook
On this page
  • Defining a Workspace-wide webhook
  • Defining a Template-specific webhook
  • Using the same webhook for several Templates or a Folder
  • Verifying requests

Was this helpful?

  1. PDFMonkey Features

Webhooks

Defining a Workspace-wide webhook

If you want to define a webhook endpoint that will be called for any document, click on the Webhooks link in the main navigation.

In the endpoints list click on the + Add Endpoint button. You can then set a URL and select the documents.generation.success event type.

That's it. Your endpoint will now be called anytime a Document is generated.

Defining a Template-specific webhook

In many cases, like when using NoCode/LowCode platforms, you may need to use a Template-specific webhook.

To define such a webhook, start by copying the ID of the Template for which to define it.

Then click on the Webhooks link in the main navigation.

In the endpoints list click on the + Add Endpoint button. You can then set a URL and select the documents.generation.success event type.

In the channels field, add template-YOUR_TEMPLATE_ID.

Channel example
template-07C63E0B-620F-44A9-AF9F-4CA0DA025A0A

That's it. Your endpoint will now be called anytime a Document is generated using your Template.

Channels are case-sensitive!

When adding your Template ID to the channels list, always make sure you paste it in upper-case, otherwise your endpoint will never be called.

Using the same webhook for several Templates or a Folder

If you need to call the same webhook enpoint for several Templates but not all your Templates, you can add up to 3 channels to an endpoint.

If 3 is not enough, you can group the Templates in a Folder and use the folder ID as channel.

Follow the same steps as listed above, but add folder-YOUR_FOLDER_ID in the channels list.

Channel example
folder-440DA20B-C5A0-A0A9-C62F-4070FAF963EA

Channels are case-sensitive!

When adding your Template ID to the channels list, always make sure you paste it in upper-case, otherwise your endpoint will never be called.

Verifying requests

Because of the way webhooks work, attackers can impersonate services by simply sending a fake webhook to an endpoint.

In order to prevent it, Svix (the service we now use to call your endpoints) signs every webhook and its metadata with a unique key for each endpoint. This signature can then be used to verify the webhook indeed comes from Svix, and only process it if it is.

PreviousSnippetsNextTroubleshooting

Last updated 1 year ago

Was this helpful?

You can learn more about verification .

in Svix's documentation