The concept of a Webhooks is simple. A Webhooks is an HTTP callback: an HTTP POST that occurs when something happens; a simple event-notification via HTTP POST.
Webhooks will POST data to a URL when certain things happen. WebHooks are a way to receive information when it happens, rather than continually polling for that data.
How do they work?
By specifying a URL for various events, the application will POST data to those URLs when the events occur. How you use it is up to you and whatever you want to accomplish. Among other things, you can:
- Create notifications to you or anybody via email and SMS...
- Put the data in another app (real-time data synchronization)
- Process the data and repost it using the app's API
How do I implement Webhooks?
Simply provide a URL, and we will POST to that URL when something happens. It's that simple. There are no specs you have to follow.
Why should I care?
As integrated as we perceive the web, most web applications today operate in silos. With the rise of API's we've seen mashups and some degree of integration between applications. However, we have not seen the vision of the programmable web: a web where you as the user can "pipe" data between apps much like the Unix command line. Some say RSS is the answer. They are wrong. The heart is in the right place, but the implementation is wrong. RSS is still useful, but it is not going to bring us the true programmable web.
We just need a simple way to get data out in real-time to let the user easily do whatever they want with it. That means no polling, no content constraints, and no XML parsing. That means no RSS. Using HTTP is simpler and easier to use. PHP is a very popular and accessible programming environment, so it's likely to be used often for writing hooklets... getting data from a web POST in PHP is as simple as $_POST['something']. And making the request to the user script is as simple as making an HTTP request, something already built-in to most programming environments. In fact, web hooks are easier to implement than an API.
However implemented (although the easier the more likely it will be adopted), having an output for the web will complement the input provided by the rising adoption of API's. When you have both input and output, you have everything you need for apps to easily interact. This will encourage smaller, more focused apps that together with hook-enabled heavier apps will let amazing emergent creations happen!