Set up in the dashboard
Webhooks are created and managed in the Cademí dashboard, at Settings > Integrations > Webhooks, where you can create a webhook in payload version 2 or 1, or in version 3. Version 3 webhooks can also be created through the API with POST /webhooks; see API webhooks for every option, including resource filters and the level of detail.
Payload version 2 or 1
For each webhook, choose:
- Event: the event that triggers the delivery, such as Product completed.
- Scope, for some events: a product, delivery, exam, or lesson that narrows the deliveries. Progress reached also takes the progress percentage that triggers it.
- Endpoint: your URL, with a hostname; an IP address is not accepted.
- Payload version:
2or1, which is deprecated. See Payload version 2 and Payload version 1.
Signing secret
Every webhook has a signing secret, used to sign each delivery (see Signatures). To see it, open the webhook and, under Signing secret, select Generate new secret. The new secret appears in a window that also explains how to verify the signature:
- the new secret is shown only once, so store it right away;
- the previous secret keeps signing deliveries for 24 hours, so you can update your endpoint without losing events.
Until you generate a secret for a version 2 or 1 webhook, it signs with a secret you have never seen. Generate a new secret once to start verifying its deliveries.
Status and delivery history
A webhook is active or inactive. A webhook disabled by the platform after repeated failures shows the reason, with Reactivate and Reactivate and resend the last 48 hours; see Automatic deactivation.
The History tab, next to Endpoints at Settings > Integrations > Webhooks, lists the deliveries of the last 60 days with their status, and the status code and body your endpoint returned. You can resend a delivery from there.