Skip to main content

Events Webhook

For each webhook event, you can review when the event occurs, descriptions about the payload object parameters and an example payload,.

Index#

These are the currently available events to be notified via webhook:

Format#

The webhooks are a POST HTTP request, sent as a JSON document.

Headers#

The requests will contain some extra headers:

HeaderDescription
Content-typeapplication/json
X-SignatureThe HMAC hash to verify the webhook integrity. More info on Security.

Common payload properties#

These fields are part of every event notified as webhook:

KeyTypeDescription
typestringThe name of the event.
occurred_ondatetimeThe moment the event happened, using ISO8601 extended format (Y-m-d\TH:i:sO).
payloadobjectThe event body.

Events#

message_sent#

The message has been sent.

Payload object#

FieldTypeDescription
message_iduuidThe message id.
installation_iduuidThe unique id of the installation.
user_idstringThe user identifier.
specialitystringThe name of the speciality.
professional_idintThe 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#

FieldTypeDescription
message_iduuidThe message id.
installation_iduuidThe unique id of the installation.
user_idstringThe user identifier.
specialitystringThe name of the speiality.
professional_idintThe 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#

FieldTypeDescription
installation_iduuidThe unique id of the installation.
os_namestringThe OS name.
os_versionstringThe OS version.
device_modelstringThe device model.
language_codestring|nullThe code of the language.
country_codestring|nullThe 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#

FieldTypeDescription
installation_iduuidThe unique id of the installation.
user_idstringThe 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#

FieldTypeDescription
installation_iduuidThe unique id of the installation.
user_idstring|nullThe 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#

FieldTypeDescription
installation_iduuidThe unique id of the installation.
user_idstringThe user identifier.
statusintThe 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#

FieldTypeDescription
installation_iduuidThe unique id of the installation.
user_idstringThe user identifier.
statusintThe status of the user. 2:Premium, 0:Free, 4:Freemium
mobile_phonestringThe user's mobile phone number.
mobile_phone_prefixstringThe user's mobile phone prefix.
emailstringThe user's email.
coverage_namestringUser 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#

FieldTypeDescription
user_idstringThe user identifier.
from_statusintThe older status.
to_statusintThe 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
}
}