Skip to main content
Version: 8.x

Webhook

The webhook feature lets Gotenberg asynchronously upload output files from multipart/form-data routes to a specified destination. The API immediately returns a 204 No Content response while the upload continues in the background.

It uses the following HTTP headers:

HeaderDescriptionDefault
Gotenberg-Webhook-UrlThe callback to use.required
Gotenberg-Webhook-Error-UrlThe callback to use if error.required
Gotenberg-Webhook-MethodThe HTTP method to use (POST, PATCH, or PUT).POST
Gotenberg-Webhook-Error-MethodThe HTTP method to use if error (POST, PATCH, or PUT).POST
Gotenberg-Webhook-Extra-Http-HeadersThe extra HTTP headers to send to both URLs (JSON format).None

Checkout the Webhook module configuration to tailor the Webhook feature to your needs.

info

PipeDream provides an excellent platform if you wish to test the webhook feature.

curl \
--request POST http://localhost:3000/forms/chromium/convert/url \
--header 'Gotenberg-Webhook-Extra-Http-Headers: {"MyHeader": "MyValue"}' \
--header 'Gotenberg-Webhook-Url: https://my.webhook.url' \
--header 'Gotenberg-Webhook-Method: PUT' \
--header 'Gotenberg-Webhook-Error-Url: https://my.webhook.error.url' \
--header 'Gotenberg-Webhook-Error-Method: POST' \
--form url=https://my.url
Gotenberg-Trace: {trace}