Skip to content

Receiving webhooks

Organisations send their events to other systems under Admin → Integrations → Webhooks: an automation in n8n, Zapier, Make or Power Automate, or their own server (ADR 0033).

  1. Add webhook: the receiver’s HTTPS address, a name, and the events it should get.
  2. Copy the signing secret (whsec_…). It is shown once; New secret makes another and ends the old one at once.
  3. Send test posts a webhook.test event and shows what the receiver answered.

Examples of addresses: an n8n Webhook node’s production URL, a Zapier Catch Hook, a Make Custom webhook, a Teams workflow When a Teams webhook request is received (Power Automate). The address must be reachable on the internet; addresses in private networks are refused.

A POST with content-type: application/json, a CloudEvents 1.0 envelope:

{
"specversion": "1.0",
"id": "5d1c…",
"type": "training.overdue",
"source": "academy",
"subject": "training-records/8f2e…",
"time": "2026-10-27T08:00:00.000Z",
"datacontenttype": "application/json",
"organisationid": "a1b2…",
"data": { "recordId": "8f2e…", "requirementId": "…", "personId": "…", "courseId": "…", "teamId": "…", "kind": "mandatory", "dueAt": "…", "completedAt": null, "validUntil": null, "passed": null }
}

The headers are webhook-id (the event’s id, the same on every retry), webhook-timestamp (seconds since 1970) and webhook-signature; the user-agent is i3-Academy-Webhooks/1.

Events carry ids, status and dates; person.created also contains the email address. person.updated lists the changed fields (changed: ["department", "managerId"]), not their values. Read anything further through the automation API with a machine client. GET /v1/integrations/events (scope webhooks:read) lists every event type.

Event When data
person.created A person joins the organisation (any way: invitation, sign-in, SCIM, directory, import) personId, email, external
invitation.accepted An invited person signed in for the first time personId, joinedAt
person.updated Name, address, roles or employment fields changed personId, changed
person.deactivated / person.reactivated Suspended / unsuspended personId
person.erased Erased (GDPR) personId
person.restricted / person.restriction_lifted The person restricted the processing of their data (Art. 18 GDPR) / lifted it; ADR 0293. While restricted, keep the data but don’t evaluate or profile it personId
enrollment.created / enrollment.revoked Enrolled in a course / enrolment withdrawn courseId, personId, source, dueAt
program.assigned A programme was assigned to a person (also through a class) or to a class programId, personId or classId, source, dueAt
class.member_added A person was put in a class classId, personId, role
course.published A course is published courseId, title
course.completed / course.completion_revoked All of a course done / completion withdrawn (e.g. attendance corrected) courseId, personId, completedAt
training.assigned A required training round opens for a person training record (above)
training.due_soon Due within 7 days (once per round) training record
training.overdue Mandatory and past its due date (once per round) training record
training.completed Round completed (course, external evidence, attendance) training record
training.expiring Validity ends within 30 days (once per round) training record
certificate.issued An actual course or round credential is issued certificateId, personId, courseId, optional recordId/teamId, issuedAt, validUntil, revokedAt
certificate.expiring An unrevoked issued credential expires within 30 days (once per certificate) certificate fields above; expiry is the signed credential’s date
certificate.revoked An issued credential is revoked certificate fields above
training.dropped No longer required (left the team, requirement removed) training record
training.completion_revoked A completed round was withdrawn training record
requirement.created A team gets a required or recommended training (one event for the team) requirementId, teamId, courseId, kind, dueDays, recurMonths, people
team.training_overview Mondays, for each team with required trainings teamId, week, people, overdue, dueSoon, expiring
live_session.scheduled / changed / cancelled A session open to the organisation or the public sessionId, courseId, title, kind, scheduledStart, durationMinutes
course_run.started A team’s course order in the course factory (a trainer’s, or one an automation started) begins its work (ADR 0252) runId, title, status, stage, waitReason, courseId, costEur, costCapEur, hardCapEur
course_run.awaiting_approval No longer sent: an order never waits for a person (ADR 0253); subscribing to it is still accepted –
course_run.completed The run wrote its course (a draft until published) as above, courseId set
course_run.failed / course_run.cancelled The run stopped as above

Subscribing from an automation (REST hooks)

Section titled “Subscribing from an automation (REST hooks)”

Zapier, n8n and Make can subscribe themselves instead of someone adding the address by hand: POST /v1/integration-api/subscriptions with {"url": "https://…", "events": ["person.created"]} (scope webhooks:write) answers with the subscription’s id and its signing secret; DELETE /v1/integration-api/subscriptions/{id} ends it. GET /v1/integration-api/subscriptions lists them. They appear on the webhooks page like any other, and count towards the limit of 20. See automation.md.

Choose Microsoft Teams channel or Slack channel as the kind (format: "teams" or "slack" in /v1/admin/webhooks; ADR 0034):

  • Teams: in the channel, add the workflow Post to a channel when a webhook request is received (Workflows app or Power Automate) and paste its URL.
  • Slack: add an incoming webhook to the channel (your Slack app → Incoming Webhooks) and paste its URL.

A channel gets a card in the language you choose, and only news about teams, courses and sessions: a team’s new training, the weekly team overview, new courses and sessions. Choose a team to get only its news. Messages never name single people.

Requests are signed after Standard Webhooks; its libraries verify them. By hand: the key is the secret after whsec_, base64-decoded; the signed content is <webhook-id>.<webhook-timestamp>.<raw body>; webhook-signature is v1, followed by the base64 HMAC-SHA256. Compare in constant time and reject timestamps older than five minutes.

import { createHmac, timingSafeEqual } from "node:crypto";
function verify(secret, headers, rawBody) {
const id = headers["webhook-id"], ts = headers["webhook-timestamp"];
if (Math.abs(Date.now() / 1000 - Number(ts)) > 300) return false;
const key = Buffer.from(secret.replace(/^whsec_/, ""), "base64");
const expected = createHmac("sha256", key).update(`${id}.${ts}.${rawBody}`).digest("base64");
return headers["webhook-signature"].split(" ").some((s) => {
const [, sig] = s.split(",");
return sig && sig.length === expected.length && timingSafeEqual(Buffer.from(sig), Buffer.from(expected));
});
}
  • Answer with any 2xx within 10 seconds; do slow work afterwards.
  • Otherwise the delivery is tried again after 1 min, 5 min, 30 min, 2 h, 6 h, 12 h, then daily, for three days. The same event keeps its webhook-id: deduplicate on it. Events can arrive out of order: use time.
  • If deliveries fail for three days without any success, or the receiver answers 410 Gone, the webhook is paused and the organisation’s administrators get an email. Switch it on again under Webhooks; waiting deliveries go out at once, and failed ones can be sent again from Deliveries.
  • Deliveries are kept for 35 days, beyond the 30-day expiry-event window so normal history cleanup cannot resend the same expiry event.
  • A confirmed pause, deletion, destination change or signing-key rotation waits for an in-flight send to finish. Already reserved sends then use the current setting and payload. Manual tests and replays can still send to paused subscriptions.
  • training.overdue is generated during the first seven days after the due date; training.due_soon during the seven days before it. These event windows do not backfill all historical records when a subscription is added. Use the training-record API to retrieve current overdue records.