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 care-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.
Multi-Template webhook
When adding your Template ID in the channels list, you can add multiple ones if you want your webhook to be called for multiple Templates.

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.
Copy link
On this page
Defining a Workspace-wide webhook
Defining a Template-specific webhook
Verifying requests