# Webhooks

Synap offers a number of Webhooks, which are sent when certain events take place on the platform, such as a user completing an exam or updating their account.&#x20;

{% hint style="warning" %}
In order to set up Webhooks, you will need:

1. A Synap Pro account or higher
2. A URL endpoint that can be used to receive the webhooks&#x20;

\
Please speak to your account manager if you do not have all of these and we should be able to assist.&#x20;
{% endhint %}

If you have all of the above then follow the steps below to get setup.

{% hint style="info" %}
To get to your Webhook configurator go to settings > integrations and then select the Webhooks tab
{% endhint %}

<figure><img src="https://3316915154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkgvUeCmTPeNouRxGPC%2Fuploads%2FkTGigs20IzzXSiIewQ1M%2FScreenshot%202024-04-08%20at%2015.44.01.png?alt=media&#x26;token=003cb401-33f1-4c67-a17c-80a69c0e748b" alt=""><figcaption><p>Go to settings > integrations and then select the Webhooks tab to find the interface and begin setting up your webhooks!</p></figcaption></figure>

After selecting 'Add webhook' you'll be able to specify the event you want the webhook to be triggered by as well as the URL that you would like the events data to be sent to.

<figure><img src="https://3316915154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkgvUeCmTPeNouRxGPC%2Fuploads%2F0dCYILIUyl8LfA4K4eaY%2FScreenshot%202024-04-08%20at%2015.45.38.png?alt=media&#x26;token=fcb3ee25-b615-4ae7-addd-75a399cb6ad0" alt=""><figcaption><p>Select the even you want to use and the target URL of where you'd like the data to be sent.</p></figcaption></figure>

There is also the option for basic authentication should you wish to make your connection more secure.

<figure><img src="https://3316915154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkgvUeCmTPeNouRxGPC%2Fuploads%2FrNmdpnOWzsdxqLsa6WH3%2FScreenshot%202024-04-08%20at%2015.47.48.png?alt=media&#x26;token=8a1e8a96-e798-41b8-bc0c-632dc79615d1" alt=""><figcaption><p>Selecting basic authentication will allow you to set a username and password on your webhook</p></figcaption></figure>

The webhooks we have available are:

| Name                     | Description                                                                                                                                                                                                                                            | Code                    |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------- |
| Attempt Submitted        | Sent when a user submits any test or exam attempt on the platform                                                                                                                                                                                      | attempt.submitted       |
| Attempt Completed        | Sent when any attempt is 'completed' (including marking) on the platform. For attempts that require marking this will fire when the attempt is finalised. For auto marked auto released attempts this will fire when the attempt shows as released     | attempt.completed       |
| Attempt Override created | Sent when an attempts results are overridden, this included reverting them if they have previously been overridden                                                                                                                                     | attemptOverride.created |
| Exam Submitted           | Sent when a user submits an exam attempt on the platform                                                                                                                                                                                               | exam.submitted          |
| Exam Completed           | Sent when an exam attempt is 'completed' (including marking) on the platform. For attempts that require marking this will fire when the attempt is finalised. For auto marked auto released attempts this will fire when the attempt shows as released | exam.completed          |
| Exam Results Released    | Sent when an exam attempts results are relesased to the user                                                                                                                                                                                           | exam.released           |
| User Registered          | Sent when a new user account is created on the platform                                                                                                                                                                                                | user.registered         |
| User Updated             | Sent when a user's account details are updated                                                                                                                                                                                                         | user.updated            |
| User Added to Group      | Sent when a user is added to a new user group                                                                                                                                                                                                          | user.addedToGroup       |
| User Registered for Exam | Sent when a user is registered for an exam                                                                                                                                                                                                             | user.registeredForExam  |
| Assignment Completed     | Sent when an Assignment is completed on the platform                                                                                                                                                                                                   | assignment.completed    |
| Flag Planted             | Sent when a Flag is planted on a question                                                                                                                                                                                                              | flag.planted            |
| Store Purchase\*         | Sent when a user makes a purchase in the Synap store.                                                                                                                                                                                                  | store.purchase          |
| Invite Sent              | Sent when an invite email is sent                                                                                                                                                                                                                      | invite.sent             |

Store Purchase\* The Synap store is a custom feature not available out of the box and is not a on any standard plans  \
If there is an event you were looking to subscribe to that is not listed here, please let us know! <br>
