Webhooks API

The page outlines how to manage webhooks via the EdApp public API.

Webhooks API Overview

The EdApp Webhooks API contains the following endpoints (click the links to see detailed documentation):

Read on below for more details about webhooks.

Webhook Use Case

Webhooks are simply URLs that accept data, which can then be used by the system where the webhook originates. Webhooks are typically "called" when an event happens in another system.

Many online tools support the using Webhooks to receive data. For a complete example that connects EdApp and Slack via Slack webhooks, see Send Slack notifications from EdApp using Webhooks

Webhook Payloads

When you create a link between an event and a webhook via the POST /v2/webhooks endpoint, you will receive a response containing the "shape" of the data that will be sent to the webhook when the event it is linked to occurs.

For example, for the CourseCompletedEvent, the response will look like this:

{
"id":"webhookid",
"eventName":"CourseCompletedEvent",
"webHookUrl":"your-webhook-url",
"headers":null,
"messageFormat": {
"eventName":"CourseCompletedEvent",
"userId":"string",
"userName":"string",
"email":"string",
"firstname":"string",
"lastname":"string",
"courseId":"string",
"courseTitle":"string",
"timestamp":"datetime"
}
}

Each field that is available for the event is shown in messageFormat, along with the type of the field, eg, string, datetime, number.

Here are the messageFormats for other available events:

LessonCompletedEvent

{
"eventName":"LessonCompletedEvent",
"userId":"string",
"userName":"string",
"email":"string",
"firstname":"string",
"lastname":"string",
"courseId":"string",
"courseTitle":"string",
"lessonId": "string",
"lessonTitle": "string",
"firstname": "string",
"lastname": "string",
"timestamp": "datetime",
"score": "number"
}
LessonPublishedEvent
{
"eventName": "LessonPublishedEvent",
"userId": "string",
"userName": "string",
"email": "string",
"courseId": "string",
"courseTitle": "string",
"lessonId": "string",
"lessonTitle": "string",
"timestamp": "datetime"
}
LessonUnpublishedEvent
{
"eventName": "LessonUnpublishedEvent",
"userId": "string",
"userName": "string",
"email": "string",
"courseId": "string",
"courseTitle": "string",
"lessonId": "string",
"lessonTitle": "string",
"timestamp": "datetime"
}
CoursePublishedEvent
{
"eventName": "CoursePublishedEvent",
"userId": "string",
"userName": "string",
"email": "string",
"courseId": "string",
"courseTitle": "string",
"timestamp": "datetime"
}

CourseUnPublishedEvent

{
 "eventName": "CourseUnPublishedEvent",
"userId": "string",
"userName": "string",
"email": "string",
"courseId": "string",
"courseTitle": "string",
"timestamp": "datetime"
}
RapidRefreshSessionStartedNotificationEvent
{
 "eventName": "RapidRefreshSessionStartedNotificationEvent",
"userId": "string",
"userExternalId": "string",
"username": "string",
"email": "string",
"quizId": "string",
"quizTitle": "string",
"quizSession": "string",
"quizLink": "string",
"timestamp": "datetime"
}
RapidRefreshRetrySessionStartedNotificationEvent
{
 "eventName": "RapidRefreshRetrySessionStartedNotificationEvent",
"userId": "string",
"userExternalId": "string",
"username": "string",
"email": "string",
"quizId": "string",
"quizTitle": "string",
"quizSession": "string",
"quizLink": "string",
"timestamp": "datetime"
}
RapidRefreshSessionReminderNotificationEvent
{
 "eventName": "RapidRefreshSessionReminderNotificationEvent",
"userId": "string",
"userExternalId": "string",
"username": "string",
"email": "string",
"quizId": "string",
"quizTitle": "string",
"quizSession": "string",
"quizLink": "string",
"timestamp": "datetime"
}

CourseReminderWebHookEvent

{
"eventName": "CourseReminderWebHookEvent",
  "userId": "string",
  "userExternalId": "string",
  "username": "string",
  "email": "string",
  "courseId": "string",
  "courseTitle": "string",
  "courseLink": "string",
  "dueDate": "datetime",
  "timestamp": "datetime"
}