Webhooks
As we have learned about APIs and how to interact with them, we have created data, stored data, updated data, deleted data, and retrieved that data. All of these things were done by using either MongoDB as our database management software, or we have used SoapUI to test and interact with the API. What if we wanted to store information in the database every time someone logs into the website or send an email to someone after they register with the information they need to log in? These kinds of automation that deal with events to APIs are called webhooks. Events can be anything from a button pressed, some information has been created or retrieved, or even a user landing on a webpage
Get Ace D Baugh’s stories in your inbox
Join Medium for free to get updates from this writer.
Sometimes these webhooks are referred to as reverse APIs because when something happens to the API then something happens instead of us acting upon the API itself. A very common thing that is a practical use of this is when you make a charge to your credit card, you can have it set up that every charge triggers a message to your cellphone with the amount of the charge and where it was. Both pieces of data are stored in the API, but instead of you going to the website and looking at your history, this is sent automatically. Another example for us as web developers, a good use for this would be a message sent to us on discord or slack anytime someone on our project has made a commit to GitHub.
References
What are Webhooks and how they work. Hookdeck. (n.d.). Retrieved December 6, 2022, from https://hookdeck.com/webhooks/guides/what-are-webhooks-how-they-work



