Using webhooks for chart publish events
Webhooks are a really useful way to integrate Datawrapper with other services. Datawrapper allows for the configuration of webhook URLs that get notified whenever a chart in your team is published or unpublished. This makes it possible to perform actions automatically based on these events. You could send messages to your messaging service, or trigger actions when a chart gets published, like downloading a PNG of it.
You can activate custom webhooks for both your whole workspace and specific teams in your workspace.
For workspace webhooks, go to your Integrations settings here: app.datawrapper.de/settings/integrations
For team-specific webhooks, choose the right team in your settings, then choose Integrations.
Toggle the Enable custom webhook switch and enter URLs for where your service listens for webhook events.

Webhooks are only delivered over HTTPS. No other protocol is supported.
Now you're all set!
Your service gets called with a JSON payload that includes the chart ID, version, and details about the user who triggered the event. Since we send a request body, our server makes a POST request to your webhook URL:
POST /webhook HTTP/1.1
content-type: application/json
content-length: 32
{"id":"aBcDe","publicVersion":1,"user":{"id":123,"email":"user@your-org.com"}}For unpublish events, the request will not contain a publicVersion in the payload.
To test it out, you can use a webhook testing site like webhook.site. Paste "your unique URL" as the webhook URL into Datwrapper, trigger the webhook (meaning, publish a chart) and then you’ll see it picked up on the site.
