Skip to contentSkip to navigationSkip to topbar
Page toolsOn this page
Looking for more inspiration?Visit the

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:

  1. You add an API to your app.
  2. The API includes a webhook property that points to a URL for a different web app.
  3. A user of your app does something that triggers an event.
  4. The API sends data received from that event to the webhook URL you specified.
  5. The app returns the result of the webhook.

Webhooks in Twilio

webhooks-in-twilio page anchor

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(link takes you to an external page) 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.

SMS HTTP request cycle showing server-client interactions with webhooks.

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