> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.superpath.io/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Types of Events

# Types of Events

**In this article:**
* Overview
* Event list
* Learning events
* Certificate events
* Data types
* Things to keep in mind
* FAQs

## Overview

This is a list of all the types of events we currently send. We may add more at any time, so in developing and maintaining your code, you should not assume that only these types exist. If there are events that you would like to see sent that are not listed here, please reach out to [support@superpath.io](mailto:support@superpath.io).

You choose which of these events a webhook receives when you register it, under **Settings → Integrations → Manage Webhooks**. See the help article *How to Register a Webhook*. Each event name below is the exact string that arrives in the `event` attribute of [the event object](https://help.superpath.io/en/article/the-event-object-hhq80t/). You can also read the current list programmatically from `GET /webhooks/events/all`.

## Event list

| Event | When it fires | Data type |
|---|---|---|
| `user.created` | A new user has been created | User |
| `user.updated` | A user record has been updated | User |
| `user.deleted` | A user has been deleted | User |
| `userTeam.created` | A user has been added to a Team | UserTeam |
| `userTeam.updated` | A user's details in a Team have been updated | UserTeam |
| `userTeam.deleted` | A user has been removed from a Team | UserTeam |
| `team.created` | A new Team has been created | Team |
| `team.updated` | A Team has been updated | Team |
| `team.deleted` | A Team has been deleted | Team |
| `learning.created` | A user has been assigned a new learning | Learning |
| `learning.updated` | A learning has been updated, for example progress or completion | Learning |
| `learning.deleted` | A learning has been deleted | Learning |
| `event.created` | A new Event has been created | Event |
| `event.updated` | An Event has been updated | Event |
| `event.deleted` | An Event has been deleted | Event |
| `tenant.updated` | Your account has been updated. Shown as **Account updated** in the event picker | Tenant |
| `form.created` | A new Form has been created | Form |
| `form.updated` | A Form has been updated | Form |
| `form.deleted` | A Form has been deleted | Form |
| `response.created` | A new response to a Form has been added | Response |
| `response.updated` | A response has been updated | Response |
| `response.deleted` | A response has been deleted | Response |
| `content.created` | New Content has been added | Content |
| `content.updated` | Content has been updated | Content |
| `content.deleted` | Content has been deleted | Content |
| `points.created` | A user has earned new gamification points | UserPoints |
| `points.updated` | A user's gamification points have been updated | UserPoints |
| `points.deleted` | A user's gamification points have been deleted | UserPoints |
| `comment.created` | A new comment was created | Comment |
| `comment.updated` | A comment was updated | Comment |
| `comment.deleted` | A comment was deleted | Comment |
| `certificate.created` | A new certificate has been added to your Library | Certificate |
| `certificate.updated` | A certificate in your Library has been updated | Certificate |
| `certificate.deleted` | A certificate has been deleted from your Library | Certificate |
| `userCertificate.created` | A certificate has been awarded to a user | UserCertificate |
| `userCertificate.updated` | A user's awarded certificate has been updated | UserCertificate |
| `userCertificate.deleted` | A user's awarded certificate has been deleted | UserCertificate |

## Learning events

The three `learning.*` events cover more than one kind of record, because "a learning" in SuperPath can be a piece of assigned learning, a Pathway a user is working through, or a single step within a Pathway. All three arrive under the same event names, so use the `learningType` field in `data` to tell them apart:

| `learningType` | What the record is |
|---|---|
| `assignment` | A piece of Content, an Event or a Form assigned to a user |
| `pathway` | A Pathway assigned to a user |
| `step` | A single step inside a Pathway the user is working through |

For a `step`, the `data` object also carries `parentId`, `parentTitle` and `parentType`, which identify the Pathway the step belongs to.

## Certificate events

There are two kinds of certificate event:

* `certificate.*` is about the certificate in your Library itself, for example its name, provider or how long it stays valid.
* `userCertificate.*` is about one user's awarded copy of a certificate.

Deleting a certificate from your Library also sends `userCertificate.deleted` for every user who held it.

In a `UserCertificate`, `certificateFile` is the link to the PDF awarded to that user. `certificateUrl` is the provider link set on the certificate, which is the same for everyone who holds it. `dateAwarded` and `dateExpires` give the award and expiry dates. `dateExpires` is `null` when the certificate does not expire.

A certificate synced to an HR system can send `userCertificate.created` followed shortly by one `userCertificate.updated`, when the HR system's record id is added.

## Data types

The **Data type** column above names the shape of the `data` object in [the event object](https://help.superpath.io/en/article/the-event-object-hhq80t/):

| Data type | What it describes |
|---|---|
| User | A user record: name, email, position, role, timezone, points totals and status |
| UserTeam | A user's membership of a Team |
| Team | A Team record |
| Learning | Learning assigned to, or progressed by, a user. See **Learning events** above |
| Event | An Event in your Library |
| Tenant | Your SuperPath account and its settings |
| Form | A Form or quiz |
| Response | A user's response to a Form |
| Content | A piece of Content in your Library |
| UserPoints | A gamification points record for a user, including the action that earned it |
| Comment | A comment on a record, including its likes and reply counts |
| Certificate | A certificate in your Library, without its template layout or notification rules |
| UserCertificate | A certificate awarded to a user, including award and expiry dates, score and the awarded PDF in `certificateFile` |

Every one of these includes `tenantId` and `id`. For the exact fields of each, look at the corresponding resource in the [API reference documentation](https://superpath.readme.io/reference).

## Things to keep in mind

* We may add event types at any time. Handle unrecognised event names gracefully rather than treating them as an error.
* A single action can produce more than one event. For example, progressing through a Pathway can raise `learning.updated` for the step and again for the Pathway itself as its progress changes.
* Both a `created` and an `updated` event can arrive in quick succession for the same record when it is created and then immediately modified. Make your handling idempotent.
* SuperPath retries a failed delivery for about 8.5 hours and then stops, so do not treat the event stream as a guaranteed, gap-free log. A retry can also repeat a delivery your endpoint already processed: use the `SuperPath-Delivery-Id` header to skip it. See **Delivery, retries and failures** in [Webhooks - Get updates in real-time](https://help.superpath.io/en/article/webhooks-get-updates-in-real-time-19fivqo/).

## FAQs

**How do I get the current list of events in code?**
Call `GET /webhooks/events/all` on the authenticated API. It returns each event with the value to subscribe to and the label shown in the app.

**Can one webhook subscribe to more than one event?**
Yes, and at least one event is required. Subscribe a single webhook to as many events as you like and switch on the `event` attribute in your handler.

**An event I want isn't listed. Can it be added?**
Contact [support@superpath.io](mailto:support@superpath.io) and tell us what you need. The list grows based on customer requests.

**Why do I get `learning.updated` for things that aren't assignments?**
Because Pathways and Pathway steps use the same event names. Check `data.learningType` to see whether the record is an `assignment`, a `pathway` or a `step`.