Docs Guides

Webhooks

Signed, retried event delivery, with every event and its payload.

Every state change writes an event in the same transaction as the change, so an event exists if and only if the change committed. A dispatcher delivers events to the endpoints you register.

Webhooks notify. To act on one, call the API.

Register an endpoint#

curl -X POST "$LMS_URL/api/v1/webhook-endpoints" \
  -H "X-API-Key: $LMS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "url": "https://api.example.com/lms/events",
  "eventTypes": [
    "enrollment.completed",
    "certificate.issued"
  ]
}'

Use ["*"] for everything. The response includes the signing secret (whsec_…) once. The URL must be https and must not resolve to a private, loopback or link-local address.

What you receive#

POST with Content-Type: application/json and these headers:

Header Meaning
X-NoBS-Event The event type
X-NoBS-Delivery This delivery’s id
X-NoBS-Signature t=<unix seconds>,v1=<hex>
{
  "id": "6f1c0b9e-3a52-4d7e-8b14-9c2e7a05d3f8",
  "type": "enrollment.completed",
  "occurredAt": "2026-11-25T14:03:11Z",
  "tenantId": "0d7e4c2a-91b3-4f6a-8e05-b7c19a3d5e42",
  "data": { "userId": "…", "courseId": "…" }
}

Verify the signature#

v1 = HMAC_SHA256(secret, t + "." + rawBody). Use the raw request body, not re-serialised JSON, and reject timestamps more than a few minutes old.

import { createHmac, timingSafeEqual } from 'node:crypto'

export function verify(rawBody, header, secret, toleranceSeconds = 300) {
  const parts = Object.fromEntries(header.split(',').map((p) => p.split('=')))
  const age = Math.abs(Date.now() / 1000 - Number(parts.t))
  if (!parts.t || !parts.v1 || age > toleranceSeconds) return false
  const expected = createHmac('sha256', secret).update(`${parts.t}.${rawBody}`).digest('hex')
  const a = Buffer.from(expected), b = Buffer.from(parts.v1)
  return a.length === b.length && timingSafeEqual(a, b)
}

Delivery guarantees#

  • At least once. Use the event id to de-duplicate; it is stable across retries.
  • A 2xx is success. Anything else, or a timeout, is retried after 1 minute, 5 minutes, 30 minutes, 2 hours, then 12 hours. After 6 attempts the delivery is FAILED.
  • Redirects are not followed.
  • See history at GET /webhook-endpoints/{id}/deliveries, and test with POST /webhook-endpoints/{id}/ping.

Event catalog#

GET /event-types returns this list.

Type When data
course.created Course created slug
course.version.created New draft started version
course.published Draft published slug, version
license.created License granted organizationId, productId
invitation.created Invitation sent organizationId, email
invitation.accepted Invitee joined organizationId, userId
member.updated Access or role changed organizationId, userId, access, roleId
member.removed Member removed organizationId, userId
enrollment.created Learner enrolled userId, courseId, organizationId, source
enrollment.withdrawn Enrollment withdrawn userId, courseId
enrollment.completed Completion rule met userId, courseId
enrollment.expired Access ran past expiresAt userId, courseId
lesson.completed Lesson completed userId, courseId, lessonId
attempt.submitted Quiz submitted or timed out userId, assessmentId, attemptId, needsGrading
attempt.graded Final score available userId, assessmentId, attemptId, scorePercent, passed
certificate.issued Certificate issued userId, courseId, serial, enrollmentId
certificate.revoked Certificate revoked userId, serial, reason
webhook.ping Test delivery message

Type to search guides and every endpoint.