What is a Webhook?
An event-driven communication that sends data between apps using custom HTTP POST request to a URL.
To handle event-driven data communications between two apps, webhooks have replaced API requests. Rather than an outside app making requests your API on a regular cadence to see if something changed, your app sends a notification when something changes. This has led to webhooks being called "Reverse APIs".
To implement a webhook:
- You add an API to your app.
- The API includes a webhook property that points to a URL for a different web app.
- A user of your app does something that triggers an event.
- The API sends data received from that event to the webhook URL you specified.
- The app returns the result of the webhook.
To let your app know when events happen, Twilio uses webhooks. These events could include receiving an SMS message or getting an incoming phone call. When the event occurs, Twilio makes an HTTP request to the URL you configured for your webhook. The Twilio request includes event details such as the incoming phone number or the body of an incoming message. To communicate events, many web services like GitHub and Slack also make use of webhooks.

Whichever framework and language you choose, webhooks function the same for every Twilio app.