Events Webhook
For each webhook event, you can review when the event occurs, descriptions of the payload object parameters, and an example payload.
Index
These are the currently available events to be notified via webhook:
- message_sent.
- message_read.
- installation_created.
- app_opened.
- app_uninstalled.
- user_logged_in.
- user_first_logged_in.
- user_status_changed.
Format
The webhooks are a POST HTTP request, sent as a JSON document.
Headers
The requests will contain some extra headers:
| Header | Description |
|---|---|
Content-type | application/json |
X-Signature | The HMAC hash to verify the webhook integrity. More info on Security. |
Common payload properties
These fields are part of every event notified as webhook:
| Key | Type | Description |
|---|---|---|
type | string | The name of the event. |
occurred_on | datetime | The moment the event happened, using ISO8601 extended format (Y-m-d\TH:i:sO). |
payload | object | The event body. |
Events
message_sent
The message has been sent.
Payload object
| Field | Type | Description |
|---|---|---|
message_id | uuid | The message id. |
installation_id | uuid | The unique id of the installation. |
user_id | string | The user identifier. |
speciality | string | The name of the speciality. |
professional_id | int | The identifier of the professional. |
Payload example
{
"type": "message_sent",
"occurred_on": "2021-09-14T15:55:12.642+00:00",
"payload": {
"message_id": "eda7c7ba-58d6-4943-9ebe-d0a8e4a7443e",
"installation_id": "ba55ab42-9d09-4fbe-805e-ac91e62cae3f",
"user_id": "32402404G",
"speciality": "work",
"professional_id": 5
}
}
message_read
The message has been read.
Payload object
| Field | Type | Description |
|---|---|---|
message_id | uuid | The message id. |
installation_id | uuid | The unique id of the installation. |
user_id | string | The user identifier. |
speciality | string | The name of the speciality. |
professional_id | int | The identifier of the professional. |
Payload example
{
"type": "message_read",
"occurred_on": "2021-09-14T15:55:12.642+00:00",
"payload": {
"message_id": "eda7c7ba-58d6-4943-9ebe-d0a8e4a7443e",
"installation_id": "ba55ab42-9d09-4fbe-805e-ac91e62cae3f",
"user_id": "32402404G",
"speciality": "work",
"professional_id": 5
}
}
installation_created
A new installation has been created.
Payload object
| Field | Type | Description |
|---|---|---|
installation_id | uuid | The unique id of the installation. |
os_name | string | The OS name. |
os_version | string | The OS version. |
device_model | string | The device model. |
language_code | string|null | The code of the language. |
country_code | string|null | The code of the country. |
Payload example
{
"type": "installation_created",
"occurred_on": "2021-09-14T15:55:12.642+00:00",
"payload": {
"installation_id": "ba55ab42-9d09-4fbe-805e-ac91e62cae3f",
"os_name": "ios",
"os_version": "16.0.2",
"device_model": "iPhone13,2",
"language_code": "es",
"country_code": "es"
}
}
app_opened
The app has been opened.
Payload object
| Field | Type | Description |
|---|---|---|
installation_id | uuid | The unique id of the installation. |
user_id | string | The user identifier. |
Payload example
{
"type": "app_opened",
"occurred_on": "2021-09-14T15:55:12.642+00:00",
"payload": {
"installation_id": "ba55ab42-9d09-4fbe-805e-ac91e62cae3f",
"user_id": "32402404G"
}
}
app_uninstalled
The app has been uninstalled.
Payload object
| Field | Type | Description |
|---|---|---|
installation_id | uuid | The unique id of the installation. |
user_id | string|null | The user identifier. |
Payload example
{
"type": "app_uninstalled",
"occurred_on": "2021-09-14T15:55:12.642+00:00",
"payload": {
"installation_id": "ba55ab42-9d09-4fbe-805e-ac91e62cae3f",
"user_id": "32402404G"
}
}
user_logged_in
The user has logged in.
Payload object
| Field | Type | Description |
|---|---|---|
installation_id | uuid | The unique id of the installation. |
user_id | string | The user identifier. |
status | int | The status of the user. 2: Premium, 0: Free, 4: Freemium |
Payload example
{
"type": "user_logged_in",
"occurred_on": "2021-09-14T15:55:12.642+00:00",
"payload": {
"installation_id": "ba55ab42-9d09-4fbe-805e-ac91e62cae3f",
"user_id": "32402404G",
"status": 2
}
}
user_first_logged_in
Payload object
| Field | Type | Description |
|---|---|---|
installation_id | uuid | The unique id of the installation. |
user_id | string | The user identifier. |
status | int | The status of the user. 2: Premium, 0: Free, 4: Freemium |
mobile_phone | string | The user's mobile phone number. |
mobile_phone_prefix | string | The user's mobile phone prefix. |
email | string | The user's email. |
coverage_name | string | User plan information. Depending on your integration, this can be a group, contract type, or anything that can be used to group and filter users. |
Payload example
{
"type": "user_first_logged_in",
"occurred_on": "2024-04-25T15:55:12.642+00:00",
"payload": {
"installation_id": "ba55ab42-9d09-4fbe-805e-ac91e62cae3f",
"user_id": "32402404G",
"status": 2,
"mobile_phone": "666996699",
"mobile_phone_prefix": "34",
"email": "user@testcompany.com",
"coverage_name": "collective 1"
}
}
user_status_changed
The user's status has been changed.
Payload object
| Field | Type | Description |
|---|---|---|
user_id | string | The user identifier. |
from_status | int | The older status. |
to_status | int | The new status. |
Payload example
{
"type": "user_status_changed",
"occurred_on": "2021-09-14T15:55:12.642+00:00",
"payload": {
"user_id": "32402404G",
"from_status": 4,
"to_status": 0
}
}