Webhooks allow you to build or set up apps which subscribe to certain events on Clui. When an event is triggered, Clui sends a HTTP POST payload to the webhook's configured URL.
Webhooks can be used to report activities such as completion of enrolments, new user signups or purchases to your system.
Once installed, the webhook is triggered each time the subscribed events occurs.
Note: For information about using Clui's API, see 'Accessing developer API documentation'.
Subscribing to events
When configuring a webhook, you can choose the events you want to receive payloads for.
To limit the number of HTTP requests to your server, we recommend only subscribing to the events you plan to handle. You can change the list of subscribed events in your Clui enterprise settings at any time.
Each event corresponds to a certain set of actions that can happen to your enterprise. For example, if you subscribe to the “User passes course” event, you'll receive detailed payloads each time an enrolment is passed.
Setting up webhooks in your enterprise
To set up webhooks in Clui, follow these steps:
- Click the arrow next to your account name in the top-right corner of Clui and select Enterprise settings.
- Change to the WEBHOOKS tab.
- Click Create a webhook or Create (if this is not your enterprise's first webhook).
- Give the webhook a name and provide a Post URL (which is the website address where the webhook data is sent to).
- Select the webhooks you want to apply (hover over the Help icon next to a webhook type for a sample JSON payload).
- Click Test.
- Verify that the webhook data was received by the POST URL.
- Click Save.
The webhook appears in the table of webhooks for your enterprise. Hover over the webhook and click the menu icon that appears to access the Edit, Disable or Enable, and Delete actions.
For more information about enterprise settings, see 'Managing your enterprise settings'.
Using webhooks in courses
In addition to predefined webhooks, you can specify your own events within a course. This can be done by adding an action module to your course with a webhook action. The action is triggered when a learner reaches the module within the course and sends the payload to the defined URL.
For more information about action modules in courses, see 'Using action modules to automate courses'.