# How to send events to another system with webhooks

> In Continuum Learn, Settings > Website & API > Webhooks sends events such as enrolments and completions to another system's HTTPS address, signed so it can check they came from you. Send test checks the connection, and the delivery log can redeliver.

A webhook is a message Continuum Learn sends to another system the moment something happens. Instead of your membership system or CRM asking Continuum "anything new?" every hour, Continuum tells it straight away: "Sam has completed Food Safety Level 2".

Your developer or supplier gives you the address (a URL) their system listens on. This guide is for the admin who sets it up in Continuum. The technical details, including how a receiving system checks each message, are in the [webhooks developer documentation](https://continuumlearn.com/developers/webhooks).

> **Who can do this:** team admins. Webhooks are on **Settings > Website & API**.

## Which events can be sent

| Event | Sent when |
|---|---|
| `user.created` | Someone joins your team, by registering, accepting an invitation, signing in with single sign-on for the first time, or being added by the API or your membership system |
| `user.removed` | Someone is removed from your team |
| `enrolment.created` | Someone is enrolled on a course directly: by an admin, by themselves, by buying it, or through the API |
| `enrolment.removed` | Someone's direct enrolment is removed |
| `course.completed` | A learner completes a course |
| `certificate.issued` | A course or programme certificate is issued, including a renewed one |
| `order.completed` | Someone pays for something at checkout |

Each message carries the details of what happened, such as the learner's name, email and membership number, and the course.

Enrolments that come from a group being assigned to a course don't send `enrolment.created` for each member. If your system needs those, your developer can read them through the API instead.

## Add an endpoint

1. Go to **Settings > Website & API**.
2. In the **Webhooks** card, click **Add endpoint**.
3. Paste the **Endpoint URL** your developer gave you. It must start with `https://`.
4. Optionally, add a **Description**, such as "CRM", so you can tell endpoints apart.
5. Under **Events**, tick the events the system needs, or **All events**. Sending only what is needed keeps the receiving system simpler.
6. Click **Add endpoint**.
7. Continuum shows the endpoint's **signing secret** once. Click **Copy** and pass it to your developer through a secure route, such as your password manager. Their system uses it to check that each message really came from you.
8. Click **I've copied it**.

You can add up to 10 endpoints.

## Check it works

Click **Send test** next to the endpoint. Continuum confirms **Test event sent** and sends a `ping` message. Click **Deliveries** to see whether the receiving system accepted it, and ask your developer to confirm it arrived.

A test is sent even when the endpoint is disabled, so you can check a fix before you turn it back on.

## Read the delivery log

Click **Deliveries** next to an endpoint to see its last 50 deliveries, with:

- the **Event**;
- the **Status**: **pending** (not tried yet), **retrying**, **succeeded** or **failed**, with the error if there was one;
- the **Code** the receiving system sent back;
- the number of **Attempts**, and **When** it was created.

In the main list, the **Last delivery** column shows when the endpoint last succeeded and last failed, or **None yet**.

Click **View payload** to see exactly what was sent. Delivery history is kept for 30 days.

## When a delivery fails

If the receiving system is down or returns an error, Continuum tries again: after 5 seconds, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours and 10 hours, about 27 hours in all. If it still hasn't been accepted by then, the delivery is marked **failed**.

Once the problem is fixed, click **Redeliver** on any finished delivery (**succeeded** or **failed**) in the log to send it again. A delivery that is still **pending** or **retrying** can't be redelivered until it finishes. The receiving system gets the same message, with the same id, so it can tell it isn't a new event.

Some failures aren't retried: if the endpoint's address now points at a private or internal network, or the endpoint has been disabled or deleted, the delivery is marked **failed** straight away.

## If an endpoint is disabled automatically

Each endpoint shows a status: **Active**, **Disabled** (turned off by an admin) or **Disabled (failing)**. If an endpoint keeps failing (50 failed deliveries in a row and no success for 5 days), Continuum turns it off and shows it as **Disabled (failing)**. Your team's admins and owners get an email headed "A webhook endpoint was disabled", naming the endpoint, with an **Open webhook settings** link.

To get it working again:

1. Fix the receiving system.
2. Click **Send test** and check **Deliveries** to confirm it now succeeds.
3. Click **Enable**.
4. Events that happened while it was off were not saved up, so **Redeliver** any you need from the log.

## Turn off, rotate or delete

- **Disable** stops sending to an endpoint without deleting it. Click **Enable** to start again.
- **Rotate secret** asks you to confirm, then shows the **New signing secret** once. For 24 hours, messages are signed with both the old and the new secret, so your developer has time to switch over without missing anything.
- **Delete** asks you to confirm, then removes the endpoint and its delivery history. Nothing more is sent to it.

## The older credential webhook

If you already send issued credentials to another system from **Settings > Webhooks**, that keeps working as before. For new set-ups, use the `certificate.issued` event here instead: it covers course and programme certificates and uses the same signed format as every other event.

The **Settings > Webhooks** page is also where your membership system sends updates *to* Continuum (inbound webhooks). That is a separate feature and is unaffected.

## Frequently asked questions

### Do webhooks cost extra?

No. Webhooks are included on every Continuum Learn plan.

### What happens if our system was offline for a day?

Deliveries are retried for about 27 hours, so a day's outage is usually covered. Anything that failed after that can be sent again with **Redeliver** from the delivery log, which keeps 30 days of history.

### Can a webhook change anything in Continuum?

No. Webhooks only send information out. To change things in Continuum from another system, your developer uses the [API](https://continuumlearn.com/developers) with an [API key](https://continuumlearn.com/help/api-keys).

### Is personal data sent?

Yes: messages include the learner's name and email, and their membership number if you store one. Only send events to systems you trust with that data, and only the events they need.
