To add a webhook to an event with the dashboard is very simple, it requires two steps: The first is to create the webhook and then to add it to an API configuration.
Webhooks can be re-used, and so are named entities i a dashboard setup.
Step 1: Create a Webhook
First, browse to the webhooks section of your dashboard:
Next we need to select the option to add a webhook to the system, click the “Add Webhook” button:
Step 2: Set up your webhook target
Now that you are adding a webhook, tell Tyk how and where to send the request. You can include custom headers to ensure that the webhook comes from a tyk instance:
Once you have added the webhook, remember to save it.
Step 3: Browse to your API that you wish to have event enabled, and visit it’s API editor, then select “Advanced Options”:
Next, scroll down until you see the Webhooks panel:
Here you will be able to select the event to fire on and what webhook to use for the event. Since you can re-use webhooks, simply select the notification target from the drop down, and how often to leave between webhook notifications (cooldown).