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:
- 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#
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 speiality. |
professional_id | int | The identifier of the professional. |
Payload example#
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#
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#
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#
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#
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#
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. |