Events Webhook
For each webhook event, you can review when the event occurs, descriptions about the payload object parameters and an example payload,.
#
IndexThese 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.
#
FormatThe webhooks are a POST HTTP request, sent as a JSON document.
#
HeadersThe 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 propertiesThese 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_sentThe message has been sent.
#
Payload objectField | 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_readThe message has been read.
#
Payload objectField | 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_createdA new installation has been created.
#
Payload objectField | 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_openedThe app has been opened.
#
Payload objectField | Type | Description |
---|---|---|
installation_id | uuid | The unique id of the installation. |
user_id | string | The user identifier. |
#
Payload example#
app_uninstalledThe app has been uninstalled.
#
Payload objectField | Type | Description |
---|---|---|
installation_id | uuid | The unique id of the installation. |
user_id | string|null | The user identifier. |
#
Payload example#
user_logged_inThe user has logged in.
#
Payload objectField | 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 objectField | 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_changedThe user's status has been changed.
#
Payload objectField | Type | Description |
---|---|---|
user_id | string | The user identifier. |
from_status | int | The older status. |
to_status | int | The new status. |