> ## Documentation Index
> Fetch the complete documentation index at: https://docs.algoreg.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Webhooks events

## Event 1: Session state changed

Session state change will be triggered when session is opened, consented, scenario is started or scenario is finished.

Content-Type: `application/json`

| Parameter | Type | Description |
| - | - | - |
| `session_id` | `string` | Session ID |
| `session_state` | `string` | Session state |
| `language_code` | `string` | Language code |
| `scenario_code` | `string` | Scenario code |

## Event 2: Session decision was updated

This event will be triggered when decision was updated, a decision can be taken by Algoreg automatically or by a human agent any time after the session finished.

Content-Type: `application/json`

| Parameter | Type | Description |
| - | - | - |
| `session_id` | `string` | Session ID |
| `status_id` | `integer` | Status ID |
| `status_label` | `string` | Status label |
| `status_type` | `string` | Status type |

```json Decision updated theme={null}
# In case of decision change
{
  "event_id":"1",
  "event_code":"session_decision_updated",
  "event_date":"2023-07-03T11:59:46Z",
  "data": {
    "session_id": "0e9b306a-b460-42b7-9a94-7dd700e6d84c",
    "status_id": 2,
    "status_label": "NOPASS",
    "status_type": "NEGATIVE" | "POSITIVE" | "NEUTRAL"
  }
}
```

```json State changed theme={null}
# In case of session status change
{
  "event_id":"1",
  "event_code":"session_status_updated",
  "event_date":"2023-07-03T11:59:46Z",
  "data": {
    "session_id": "0e9b306a-b460-42b7-9a94-7dd700e6d84c",
    "session_state": "Scenario",
    "language_code": "fr-FR",
    "scenario_code": "default"
  }
}
```



This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.