Review note: text in green is new or changed compared with the currently published article. Remove the green color before publishing.
Introduction
The Webhooks service lets Schoox provide third-party applications with real-time information. A webhook delivers data to your application as the event happens. With a typical API, you must poll for data frequently to stay close to real time. Webhooks are more efficient for both the producer (Schoox) and the consumers (your third-party applications).
Before You Start
Webhooks are off by default. Ask your Schoox representative to enable them for your academy.
Academy admins manage webhooks: endpoints and security policies.
Where to find them: Admin (top navigation bar) → Webhooks → Endpoints or Security Policies.
Some events are offered only when the matching feature is on: Skill, Skill Group and Skill Category events need Performance & Career; micro course and micro step association events need Microlearning; micro assessment association events need Micro Assessments.
Creating, editing, activating, deactivating and deleting endpoints and security policies is recorded in the academy audit log, under the Webhooks label.
Webhook Events
An endpoint subscribes to one or more of the events below. The Payload column lists the keys of the payload object for that event. Each key is described under Entity Payload Schema.
User
Event
Triggered when
Payload
user.created
A user is created
user
user.deactivated
A user is deactivated
user
Course
Event
Triggered when
Payload
course.created
A course is created
course
course.updated
A course is updated
course
course.updated.visibility
A course’s visibility changes
course
course.updated.status
A course’s status changes
course
course.user.assigned
A course is assigned to a user
course, user
course.user.progress
A user makes progress on a course
course, user, courseProgress
course.user.completed
A user completes a course
course, user, courseProgress
course.certificate.awarded
A user earns a course certificate, including a renewal
course, user, courseCertification
course.certificate.updated
A certificate’s award or expiration date changes, or an expired certificate is reactivated
course, user, courseCertification
course.certificate.expiring
A certificate enters the course’s re-assign period before it expires
course, user, courseCertification
course.certificate.expired
A certificate expires, including when a renewal replaces it
course, user, courseCertification
course.certificate.deleted
A certificate is deleted
course, user, courseCertificationDeleted
A renewal issues a new certificate with a new id. You receive course.certificate.awarded for the new certificate and, if the old one hadn’t expired yet, course.certificate.expired for the old one, in either order. Track certificates by courseCertification.id.
One action can send several events. For example, changing a completion date so that the certificate is already expired sends course.certificate.updated and course.certificate.expired.
Certificates created or removed by a transcript import, a user merge or a permanent user deletion don’t send certificate events.
A security policy tells Schoox how to authenticate to your endpoint. An academy can have several security policies, and each endpoint can use one of them (optional).
Creating a Security Policy
Select Admin in the top navigation bar. Under Webhooks on the left, select Security Policies, then click Add New.
Enter a Name (required) and, optionally, a Description.
Choose the Authentication Type and fill in its fields (see below).
Token, Token prefix (optional, for example Bearer)
Authorization: <prefix> <token>, or just the token when no prefix is set
OAUTH
See OAuth Configuration
Authorization: Bearer <access_token>, using a token obtained with the client credentials grant
Passwords, tokens and client secrets are stored encrypted.
A security policy can’t be deleted while an endpoint uses it. Remove it from those endpoints, or delete them, first.
OAuth Configuration
Field
Required
Description
OAuth URL
Yes
The token endpoint URL
Client ID
Yes
Sent as client_id
Client Secret
Yes
Sent as client_secret
Grant Type
Yes
client_credentials, sent as grant_type
Audience
No
Sent as audience when set
Scope
No
Sent as scope when set
Resource
No
Saved with the policy, but currently not sent in the token request
Extra Headers
No
Additional HTTP headers (key/value pairs) added to the token request
Schoox requests the token with a POST to the OAuth URL, sending the fields above as an application/x-www-form-urlencoded body. The response must be JSON containing access_token and expires_in (seconds). Schoox reuses the token until expires_in has passed, then requests a new one.
Each time you save an OAuth security policy, and each time you open one for editing, Schoox requests a token to check the settings. The page then shows either A token has been successfully generated! or A token has not been created. Please check your credentials!
If Schoox can’t get a token while sending a webhook, that attempt counts as failed and is retried (see Request Failure Handling).
Webhook Endpoints
Endpoints are the URLs that Schoox sends events to. Every endpoint is bound to one or more events. When an event happens, Schoox sends it to every active endpoint subscribed to that event.
Creating an Endpoint
Select Admin in the top navigation bar. Under Webhooks on the left, select Endpoints, then click Add New.
Fill in the fields below and select each event the endpoint should receive.
Click Save.
Turn on the status toggle in the endpoints list. Endpoints are inactive by default, and an inactive endpoint receives nothing.
Field
Required
Notes
Endpoint Name
Yes
A visual identifier for telling endpoints apart
Endpoint URL
Yes
The URL that receives the events. Must start with https://
Description
No
Events
Yes
At least one event
Security Policy
No
How Schoox authenticates to the URL
Signing Secret
Every endpoint has its own signing secret, generated automatically when the endpoint is created. It has the form whsec_ followed by 32 characters. Use it to verify messages (see Verifying Webhook Messages).
To see it, open the endpoint from the endpoints list and click Edit. The Secret field is hidden: click the eye icon to show it, or the copy icon to copy it.
The secret can’t be changed or regenerated. To rotate it, replace the endpoint:
Create a new endpoint with the same URL, events and security policy. It starts inactive. Copy its secret.
Update your receiver to accept a signature made with either the old or the new secret.
Activate the new endpoint, then delete the old one. While both are active, each event arrives twice with the same wh-id, so your duplicate check drops the second copy.
Remove the old secret from your receiver.
Managing Endpoints
Open an endpoint from the endpoints list to Edit or Delete it. Use the status toggle in the list to activate or deactivate it.
Events that happen while an endpoint is inactive are not sent to it, and are not sent later when you activate it again.
Deactivating or deleting an endpoint also stops the deliveries still pending for it, including retries.
Changes to an endpoint’s URL, events or security policy also apply to its pending deliveries and retries.
Deleting an endpoint can’t be undone. Deactivate it instead if you might need it again.
Delivery
Schoox sends an HTTP POST with a JSON body (Content-Type: application/json, User-Agent: SchooxWebhooks/1.0), the three signature headers, and the authentication from the endpoint’s security policy.
A response with a 2xx status code within 60 seconds counts as delivered.
Any other status code, a timeout or a connection error counts as failed. Redirects are not followed, so a 3xx response also counts as failed.
Respond with 2xx as soon as you have received the message, and do any heavy processing asynchronously.
Source IP Addresses
Schoox sends webhooks from fixed IP addresses. If your endpoint accepts traffic only from known addresses, allow the address for the region your academy is hosted in.
Region
Production
Staging
United States
18.214.29.122
18.208.1.244
United Kingdom
35.177.213.13
3.11.78.75
Canada
15.222.227.57
52.60.245.18
Request Failure Handling
A failed event is attempted at most 5 times in total: the first attempt plus up to 4 retries, 5 minutes apart. Retries are picked up by a scheduler that runs every minute, so the actual gap can be slightly longer. After the fifth failed attempt the event is not sent again.
Every attempt carries the same wh-id, but a new wh-timestamp and wh-signature.
Delivery is at-least-once: the same event can arrive more than once. Use wh-id to skip duplicates.
Events are not guaranteed to arrive in the order they happened.
Any field can be null, for example externalId when it is not set.
Fields of type datetime are ISO 8601 strings with a UTC offset, for example 2026-10-30T14:05:00+00:00.
Fields of type date string are passed through as stored in the database (YYYY-MM-DD HH:MM:SS, no timezone). They appear on Job, Exam Question and the four micro entities.
Delete events carry only the id of the deleted item (curriculumDeleted, skillDeleted, skillGroupDeleted, skillCategoryDeleted, courseCertificationDeleted). The course.certificate.deleted event also includes course and user.
Association “deleted” events carry the two items that were linked, but no association object.
Ignore fields you do not recognise.
Entity Payload Schema
Course (key: course)
Field
Type
Values / notes
id
int
title
string
description
string
externalId
string
image
string
Image URL
status
string
ACTIVE, ARCHIVED, RETIRED, DELETED
visibilityStatus
string
PUBLIC, PRIVATE
Course Progress (key: courseProgress)
Field
Type
Values / notes
progress
int
Completion percentage, 0–100
completionDate
datetime
certificationVerificationCode
string
Verification code of the certificate, when there is one
Course Certification (key: courseCertification)
Field
Type
Values / notes
id
int
Id of the certificate. A renewal issues a new certificate with a new id
verificationCode
string
Verification code of the certificate
certificationDate
datetime
When the certificate was awarded
expirationDate
datetime
When the certificate expires; null when it never expires
expired
boolean
true once the certificate has expired
expiring
boolean
true while the certificate is in the course’s re-assign period before it expires
Skill Course Association (key: skillCourseAssociation)
Field
Type
Values / notes
sourceType
string
Always COURSE
sourceId
int
Course id
academyId
int
skillId
int
createdAt
datetime
Skill Job Association (key: skillJobAssociation)
Field
Type
Values / notes
sourceType
string
Always JOB
sourceId
int
Job id
skillId
int
weight
float
createdAt
datetime
Skill Exam Question Association (key: skillExamQuestionAssociation)
Field
Type
Values / notes
sourceType
string
Always EXAM_QUESTION
sourceId
int
Id of the association record
examQuestionId
int
metricId
int
Skill id
academyId
int
Skill Micro Associations
Keys: skillMicroCourseAssociation, skillMicroStepAssociation, skillMicroAssessmentAssociation, skillMicroAssessmentStepAssociation. All four share this schema.
Field
Type
Values / notes
id
int
Id of the association record
sourceType
string
MICRO_COURSE, MICRO_STEP, MICRO_ASSESSMENT or MICRO_ASSESSMENT_STEP, matching the key
sourceId
int
Id of the micro course, micro step, micro assessment or micro assessment step
Attackers can impersonate the webhook service by sending fake data to an endpoint. To prevent this, Schoox signs every webhook with the endpoint’s signing secret, so the receiver can confirm the message came from Schoox.
An attacker could also capture a valid message and send it again later (a replay attack). Every attempt includes the time it was sent, so the receiver can reject messages outside a tolerance it chooses.
Without verification, an endpoint accepts anything posted to it. Always verify webhooks.
Headers
Each webhook call includes three headers:
Header
Description
wh-id
Unique id of the webhook message (24 hexadecimal characters). The same on every retry, so use it to skip duplicates.
wh-timestamp
When this attempt was sent, in seconds since the Unix epoch (January 1, 1970 00:00:00 UTC). New on every attempt.
wh-signature
v1,<signature>, where v1 is the signature version and <signature> is base64-encoded.
Steps
Check that wh-timestamp is within your tolerance of the current time (for example 5 minutes).
Build the signable string: wh-id, wh-timestamp and the request body, joined with dots: {wh-id}.{wh-timestamp}.{body}. Use the body exactly as received. Parsing and re-serializing the JSON changes the bytes, and the signature will no longer match.
Take the endpoint’s signing secret and remove the whsec_ prefix. Use the remaining characters as the key exactly as they are (as UTF-8 text); do not base64-decode them. For whsec_QEMBXPKpqJdcCNHgFqiFdz7G0apKrSNP the key is QEMBXPKpqJdcCNHgFqiFdz7G0apKrSNP.
Compute the HMAC-SHA256 of the signable string with that key, and base64-encode the result.
Compare it with the part of wh-signature after v1,, using a constant-time comparison.
Each sample reads the raw body, checks the timestamp and verifies the signature. Replace the secret with your endpoint’s signing secret, and keep the secret out of source control in real code.
PHP
<?php
const SIGNING_SECRET = 'whsec_QEMBXPKpqJdcCNHgFqiFdz7G0apKrSNP'; // your endpoint's secret
const TOLERANCE_SECONDS = 300; // 5 minutes
$id = $_SERVER['HTTP_WH_ID'] ?? ''; // header "wh-id"
$timestamp = $_SERVER['HTTP_WH_TIMESTAMP'] ?? ''; // header "wh-timestamp"
$header = $_SERVER['HTTP_WH_SIGNATURE'] ?? ''; // header "wh-signature"
$body = file_get_contents('php://input'); // raw body, never re-encoded
// 1. Reject old or future messages
if (!ctype_digit($timestamp) || abs(time() - (int)$timestamp) > TOLERANCE_SECONDS) {
http_response_code(400);
exit('Timestamp outside tolerance');
}
// 2-4. Sign "{id}.{timestamp}.{body}" with the secret minus its whsec_ prefix
$key = substr(SIGNING_SECRET, strlen('whsec_'));
$expected = base64_encode(hash_hmac('sha256', "{$id}.{$timestamp}.{$body}", $key, true));
// 5. Constant-time compare with the part after "v1,"
[$version, $signature] = array_pad(explode(',', $header, 2), 2, '');
if ($version !== 'v1' || !hash_equals($expected, $signature)) {
http_response_code(401);
exit('Invalid signature');
}
$webhook = json_decode($body, true); // $webhook['event'], $webhook['payload']
http_response_code(200);
Node.js (Express)
const crypto = require('crypto');
const express = require('express');
const SIGNING_SECRET = 'whsec_QEMBXPKpqJdcCNHgFqiFdz7G0apKrSNP'; // your endpoint's secret
const TOLERANCE_SECONDS = 300; // 5 minutes
const app = express();
// express.raw keeps the body as the exact bytes Schoox sent
app.post('/schoox/webhooks', express.raw({ type: 'application/json' }), (req, res) => {
const id = req.get('wh-id') || '';
const timestamp = req.get('wh-timestamp') || '';
const [version, signature = ''] = (req.get('wh-signature') || '').split(',');
// 1. Reject old or future messages
const now = Math.floor(Date.now() / 1000);
if (!/^\d+$/.test(timestamp) || Math.abs(now - Number(timestamp)) > TOLERANCE_SECONDS) {
return res.status(400).send('Timestamp outside tolerance');
}
// 2-4. Sign "{id}.{timestamp}.{body}" with the secret minus its whsec_ prefix
const key = SIGNING_SECRET.slice('whsec_'.length);
const expected = crypto.createHmac('sha256', key)
.update(`${id}.${timestamp}.`)
.update(req.body)
.digest('base64');
// 5. Constant-time compare with the part after "v1,"
const a = Buffer.from(expected);
const b = Buffer.from(signature);
if (version !== 'v1' || a.length !== b.length || !crypto.timingSafeEqual(a, b)) {
return res.status(401).send('Invalid signature');
}
const webhook = JSON.parse(req.body.toString('utf8')); // webhook.event, webhook.payload
res.sendStatus(200);
});
app.listen(3000);
C# (ASP.NET Core)
using System.Security.Cryptography;
using System.Text;
const string SigningSecret = "whsec_QEMBXPKpqJdcCNHgFqiFdz7G0apKrSNP"; // your endpoint's secret
const long ToleranceSeconds = 300; // 5 minutes
var app = WebApplication.CreateBuilder(args).Build();
app.MapPost("/schoox/webhooks", async (HttpRequest request) =>
{
var id = request.Headers["wh-id"].ToString();
var timestamp = request.Headers["wh-timestamp"].ToString();
var signatureHeader = request.Headers["wh-signature"].ToString();
// 1. Reject old or future messages
if (!long.TryParse(timestamp, out var sentAt)
|| Math.Abs(DateTimeOffset.UtcNow.ToUnixTimeSeconds() - sentAt) > ToleranceSeconds)
{
return Results.BadRequest("Timestamp outside tolerance");
}
// Read the raw body exactly as sent
using var reader = new StreamReader(request.Body, Encoding.UTF8);
var body = await reader.ReadToEndAsync();
// 2-4. Sign "{id}.{timestamp}.{body}" with the secret minus its whsec_ prefix
var key = Encoding.UTF8.GetBytes(SigningSecret["whsec_".Length..]);
var expected = HMACSHA256.HashData(key, Encoding.UTF8.GetBytes($"{id}.{timestamp}.{body}"));
// 5. Constant-time compare with the part after "v1,"
var parts = signatureHeader.Split(',', 2);
byte[] received;
try { received = parts.Length == 2 ? Convert.FromBase64String(parts[1]) : Array.Empty<byte>(); }
catch (FormatException) { received = Array.Empty<byte>(); }
if (parts[0] != "v1" || !CryptographicOperations.FixedTimeEquals(expected, received))
{
return Results.Unauthorized();
}
// var webhook = System.Text.Json.JsonDocument.Parse(body);
return Results.Ok();
});
app.Run();
Avoiding Webhook Loops
If your application calls the Schoox API in response to a webhook, that call can produce new webhooks. To stop this, send the header X-Schoox-Suppress-Webhooks: true on those API requests. The value must be exactly the lowercase string true; any other value is ignored. The header suppresses only the events your own request produces, including background work that request starts.