What This API Endpoint Does
With the Webhooks API you create or delete webhooks from available webhook events. Whoever has access to the app where the webhook is sending the information sees course completion, course submission for publication, user and group enrollment in courses and learning paths, or when a user is added to your Rise account.
You can also use this endpoint to get a list of webhooks or details of a specific webhook.
Endpoints
POST /webhooks
- create a new webhookGET /webhooks
- list webhooksGET /webhooks/{webhookId}
- get details of a webhook by webhook idDELETE /webhooks/{webhookId}
- delete a webhook by webhook id
Webhook Object
id
(string) - the unique identifier of the webhooktargetUrl
(string) - the URL of the webhook endpoint on your serversharedSecret
(string) - a secret used to generate a signature for each request. Only returned when creating a webhook.events
(list of webhook events) - the list of webhook events enabled for this webhookapiVersion
(string) - Rise API Version used when sending the webhook event
Create Webhook
POST /webhooks
Request Parameters (JSON)
targetUrl
(string, required)events
(list of events, required)sharedSecret
(string, optional)apiVersion
(string, optional) - Rise API Version to use for the webhook event. If not provided, will default to theRise-API-Version
header sent in the request, or, if that's not specified, the initial Rise API Version,2020-07-16
Example Response
{
"id": "example-webhook-id",
"targetUrl": "https://example.com",
"events": ["course.completed"],
"sharedSecret": "the shared secret",
"apiVersion": "2020-07-16",
"url": "https://api.rise.com/webhooks/example-webhook-id"
}
Endpoint-specific Error Codes
code: 'duplicate_target_url'
- cannot create webhook because thetargetUrl
is already in use by another webhook. A 409 response will be returned in this case.
List Webhooks
GET /webhooks
Request Parameters (Query String)
limit
(integer, optional) - the maximum number of results to return in a single response (see Pagination); must be between 1 and 100 (defaults to 50)
Example Response
{
"webhooks": [
{
"id": "example-webhook-id",
"targetUrl": "https://example.com",
"events": ["course.completed"],
"apiVersion": "2020-07-16",
"url": "https://api.rise.com/webhooks/example-webhook-id"
}, ...
],
"nextUrl": "https://url-for-next-page-of-results"
}
Retrieve Webhook by ID
GET /webhooks/{webhookId}
Example Response
{
"id": "example-webhook-id",
"targetUrl": "https://example.com",
"events": ["course.completed"],
"apiVersion": "2020-07-16",
"url": "https://api.rise.com/webhooks/example-webhook-id"
}
Endpoint-specific Error Codes
webhook_not_found
- cannot retrieve webhook because the webhook doesn't exist
Delete Webhook by ID
DELETE /webhooks/{webhookId}
Success response
204 "No Content"
Endpoint-specific Error Codes
webhook_not_found
- cannot delete webhook because the webhook doesn't exist