Skip to main content

Webhooks

A webhook can be seen as a reverse API. Instead of you offering an API endpoint to a user that they have to poll until there is data, the user can instead give you an URL that you can just call with the data whenever you have some data to send. This, essentially, is a webhook.

See it like this: You are on holiday and your friend is looking after your cat. Instead of calling your friend every night to ask about the cat, and probably getting the reply that everything is fine, just give your friend your number and instructions to call you if there is something to report.

A webhook is basically a HTTP POST to an open API. They are simpler than an API endpoint, but have less functionality. Webhooks, for example, don't allow pushing, deleting or updating data in another system. They only allow receiving data.

The other disadvantage is you won’t necessarily know when the other system is down or if it failed to send data. Since you only receive data when an event occurs, if the other system didn't send any it could either mean that no events are occurring or that their system is down.

But when you're only sending specific data occasionally, webhooks are a good solution.