Webhooks End User Reference

Introduction

This document serves as a guide on how to use the Webhooks API within your environment.

❗ Before proceeding, please create your API key on your AccuLynx company website.


Purpose

  • To gain a comprehensive understanding of how to utilize the Webhooks API.
  • To learn about the data retrieved from the Webhooks API.
  • This document will also serve as a resource for documenting future API endpoints.

Definitions

What are Webhooks?

Webhooks provide a mechanism for one application to send real-time information to other applications. Essentially, they act as a notification system, allowing one application to alert another whenever a specific event occurs.

With Webhooks, one application sets up an endpoint (the webhook URL) to listen for notifications, while another application sends messages to that endpoint whenever significant events happen. This enables the receiving application to take immediate actions based on the incoming data, such as updating its database, triggering notifications, or executing other automated tasks.

Where can you use Webhooks?

  • To trigger continuous integration (CI) jobs, update external issue trackers, maintain backup mirrors, or deploy to production servers.
  • For notifications and alerts, Webhooks can inform users about events like new messages, errors, or data changes, keeping them updated.
  • For data synchronization, Webhooks can notify other applications to update their data when specific events occur. This is useful for scenarios such as updating customer information across multiple platforms.

What is a Subscription?

A subscription is the process of registering to receive notifications for specific events from a web application. By subscribing to a webhook, you express your interest in receiving updates or notifications when particular events occur, keeping you informed about changes in the web application.

What is an Event?

An event in Webhooks represents an action or change within the application that triggers the Webhook notification. The relevant information related to the event is included in the data sent alongside the notification.

Events can vary between applications and correspond to important actions or modifications that the application considers essential to communicate to external systems or subscribers.

What are topics?

Topics serve as categories or subjects that organize different types of events in Webhooks. They allow subscribers to choose specific categories of events for which they wish to receive notifications.

Topics streamline webhook notifications, making it easier for subscribers to manage and respond to events that are most pertinent to their interests or needs.

Steps on using the endpoints

To test the API endpoints, we will use an API testing tool (in this case, Postman).

  1. First, you need to get the API-Key secret from your Acculynx company website.
  2. Enter your API key in the Headers section.
    • Example
      Ensure that you select "Bearer Token" as the type.
      Untitled
  3. Choose one of the endpoints listed in this documentation. Refer to this
  4. Review the information on the page corresponding to the endpoint you wish to use. This will detail the required parameters or the JSON body needed to execute it correctly.
  5. After selecting an endpoint to test, copy its URL and fill in the appropriate data according to the specified HTTP method.
    • Example
      Here, we are using the Create Subscription Endpoint as an HTTP POST method, with its JSON body properly filled.
      Untitled
  6. After completing the previous step, submit the endpoint for testing. You will receive a response code along with content or messages.
    • Example
      In this case, the Create Subscription Endpoint was successful, returning a response code of 200 along with content data.
      Untitled
  7. If the previous steps are successful, you can run the endpoints correctly.