Skip to main content
Skip to content

Webhooks

Can Coassemble notify my systems when someone completes a course?

Yes, with webhooks. Coassemble can send a server-to-server message to your app the moment a course is created, started or completed, so your own systems react automatically without you polling for changes.

A webhook is a message Coassemble sends to your app when something happens, rather than you having to check for it. When a learner finishes a course, Coassemble posts the details to a URL you control, so you can update a record, trigger an email, issue a certificate, or sync the result into another system straight away.

Events you can subscribe to

You choose which events you want to hear about:

  • course.created, when a new course is created.
  • course.commenced, when a learner first starts a course.
  • course.completed, when a learner first completes a course.
  • quiz.completed, when a learner passes a standalone quiz.
  • quiz.failed, when a learner fails a standalone quiz.

What Coassemble sends

Each webhook is an HTTPS POST with a JSON body. The payload includes the event type and time, the workspace, details of the course (id, title, key), and the tracking record for the learner, including their identifier, email, when they started and completed, and total time spent. That's enough for your system to know exactly who did what, and when.

Each request also carries headers identifying the event, a unique delivery ID, a timestamp, and a signature you can use to verify the message genuinely came from Coassemble.

Set up a webhook

  1. Build an HTTPS endpoint in your app that accepts POST JSON and returns a 2xx response quickly. The URL must use https.
  2. In Coassemble, select Developer in the navigation, then the Webhooks tab.
  3. Select Add webhook, enter your endpoint URL, select the events you want, then under Data to receive choose Live data, Test mode data or both.
  4. Trigger a real event, such as starting a course, to confirm your receiver works. Each delivery includes a testMode field and an X-Coassemble-Test-Mode header, so you can tell test activity apart from real activity.
  5. Verify the signature on incoming requests, deduplicate using the delivery ID, then process the event.

Webhook endpoints are managed in the Developer console, on the Webhooks tab. There you can see each endpoint's delivery history and rotate its signing secret (shown once when you create or rotate it), and replay failed deliveries one at a time or in bulk. Only people with the Owner, Admin or Developer role see the Developer console.

Making delivery reliable

A delivery counts as successful only when your endpoint returns a 2xx status. Coassemble waits up to 10 seconds for a response, and retries a failed delivery up to six attempts total, with backoff of roughly 1 minute, 5 minutes, 30 minutes, 2 hours, then 6 hours. Every attempt carries the same delivery ID, so you can safely ignore duplicates. Because of retries, it's best to acknowledge quickly and do the real work afterwards.

Webhooks vs in-page events

Webhooks are server-to-server, which suits updating your back-end systems. If instead you want to react to things happening live in the learner's browser while a course is embedded, the embedded course player emits events in the page for that. Webhooks are the right choice when another system needs to know a result, even when no one's looking at the screen.

Frequently asked questions

What can I do when a course is completed?

Anything your systems support: mark a record complete, issue a certificate, send a notification, or sync the result into a CRM or LMS. Coassemble sends the learner's identifier, email and completion details so you have what you need.

How do I know a webhook really came from Coassemble?

Each request is signed. Coassemble includes a signature header, and your endpoint has its own signing secret, so you can verify the request before trusting it.

What happens if my endpoint is down?

Coassemble retries failed deliveries up to five times with increasing delays. Each retry uses the same delivery ID so you can avoid processing the same event twice.