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.

You can learn more about verification in Svix's documentation.

Last updated