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 in 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 Web Hook 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: Go to advanced options
Browse to your API that you wish to have event enabled, and visit its API editor, then select Advanced Options:
Step 4: Add webhook to API
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).