Using webhooks

Webhooks can be used to notify third-party servers about events in your account. More about webhooks.

Currently we support webhooks only for "click" event. Webhooks may be attached to domain, tag or individual URL. When URL clicked, all webhooks associated with it will be executed. This includes webhooks attached to URL domain and each of URL tags. Number of webhooks per URL is not limited, but only first 20 webhooks will be executed.

For example, short URL custom.com/hash1 has a "click"-webhook http://example.com/webhook1. This URL also has two tags: "foo" and "bar".
"foo" tag has "click"-webhook https://example.net/hook
"bar" tag has two "click"-webhooks https://example.net/wh1 and https://example.net/wh2
At last, domain custom.com has a "click"-webhook http://example.org/global-hook
As a result, when URL custom.com/hash1 clicked, all 5 webhooks will be executed:
http://example.com/webhook1
https://example.net/hook
https://example.net/wh1
https://example.net/wh2
http://example.org/global-hook

NOTE: webhooks may be executed in any order. You should not rely on order of execution!

Webhooks using POST method have a payload. Here is an example of "click"-webhook payload:

{ "event":"click", "time":"2017-12-06 15:32:39", "data":{ "hash":"myhash", "domain":"custom.com", "redirect_url":"http:\/\/example.com\/target.html", "remote_addr":"65.12.50.13", "user_agent":"Mozilla\/5.0 (X11; Linux x86_64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/62.0.3202.89 Safari\/537.36 OPR\/49.0.2725.39", "referrer":"http:\/\/example.net\/referrer.html", "accept_language":"en-US;q=0.9,en;q=0.7,fr-FR;q=0.6,fr;q=0.5" } }

Webhook using GET method have no payload. But you can pass GET-parameters in webhook's URL.

You can add webhooks to your account using Webhooks API (available only for Pro-users) or from Manage Webhooks page.

Webhooks automatically deleted when deleted object they attached to.