# Webhooks

We provide a way to get notifications from our system when a user or company gets changed. For this, we use a concept called webhooks. If you enable a webhook in our system will open a specific page given by you so you can update your system accordingly. In the webhook, we provide the type of operation and the identifier and the type of object.

This example POST request:

```
{    "entity_id": 1,    "entity_type": "user",    "action_type": "new",    "result": {        "id": 1,        "external_id": "1815",        "code": "CODE",        "external_qr_identifier": "thebarcode",        "checkin": "2019-11-05 07:56:15",        "name_first": "Guan",        "name_infix": null,        "name_last": "the Man",        "gender": "man",        "company_name": "Let's Get Digital",        "company_role": "Awesome person",        "normal_qr_code": "thebarcode",        "secure_qr_code": "https:\/\/evins.nl\/1\/bd0494941c\/tyiuW2S1OUv5c3ASL1qv%2E",        "aanmelder_survey_id": "93627",        "qr_link": "v2d5iy6g0m60tc",        "custom_fields": [],        "companies": [            5        ]    }}
```

&#x20;`entity_id` is our internal identifier for this entry

`entity_type` is the type of entity, currently we support `user` and `company`

`action_type` is the type of operation that was executed, the options are `new`, `update` and `delete`.

`result` is the new value of the record, the fields are the same as in our [API ](https://docs.letsgetdigital.com/)(this data is not provided on a `delete` action.

## Install <a href="#install" id="install"></a>

1. Login in the admin panel.
2. Go to Settings -> Integrations -> Couplings
3. Press on `New Webhook` button
4. Fill in a name, this is only used as a description, please fill in the name of the service you are coupling.
5. Set the Is active to Active to enable the webhook
6. Fill in the URL of the endpoint
7. And enable all the triggers you like to receive

## Select events <a href="#select-events" id="select-events"></a>

In the settings page, you can select which events are sent to your endpoint.

## Debug webhooks <a href="#debug-webhooks" id="debug-webhooks"></a>

We provide two functions to debug a webhook. The first is a test webhook button. If you press this a request will be fired to the given URL with a `action_type: test`. This request sends the data of your user account.

The other debug tool is the log overview in this view you can see the past 10 webhook requests to see if they function properly.

You can also use a site like <https://webhook.site/> to test requests coming from our system.
