What is a Webhook?

A webhook (also called a web callback or HTTP push API) is a way for an app to provide other applications with real-time information. A webhook delivers data to other applications as it happens, meaning you get data immediately. Unlike typical APIs where you would need to poll for data very frequently in order to get it real-time. This makes webhooks much more efficient for both provider and consumer. The only drawback to webhooks is the difficulty of initially setting them up.

Webhooks are sometimes referred to as "Reverse APIs," as they give you what amounts to an API spec, and you must design an API for the webhook to use. The webhook will make an HTTP request to your app (typically a POST), and you will then be charged with interpreting it.

Webhook Endpoint

When certain events take place on an AlphaTouch system, a Webhook action is triggered. That is to say that the AlphaTouch servers will "PING" a webpage on your server (your Webhook Endpoint) with a POST request that contains a data payload to let your servers know what has happened. The data payload consists of the following fields:

  • api_key: The unique API Key for the installation the event took place on.
  • action: The action that took place.
  • entity: The type of entity that has been impacted by the action.
  • entity_id: The ID or array of IDs of the entity or entities impacted by the action.
  • data: The data payload which will contain the object (or array of objects) impacted by the action, so you can processs accordingly.

For each Installation that will be integrated with your back-end processes, you will need to specify the Webhook Endpoint in the Installations' API section in the Management Portal.

Example Payloads
/* Example "Resident > Update" Payload */
    "data":{...} /* The Resident object that contains the newly updated data for Resident 17 */
/* Example "Resident > Delete" Payload */
    /* Notice that there is no "data" object as it is not needed for deletion */

Copyright© 2018-2024 Alpha Communications. All rights reserved.
Amazon, Echo, Alexa, and all related logos are trademarks of Amazon.com, Inc. or its affiliates.
Google LLC All rights reserved. Google and the Google logo are registered trademarks of Google LLC.