Webhooks
This page lists all the web hooks that we push to the web hook URL configured for your organisation
Chatroom Creation
Version 1.0 & 1.1
{
"type": CHATROOM_CREATED,
"version":<double>,
"payload": {
"chatroom_id": <string>,
"external_ref_id": <string>,
"chatroom_type": <enum CONTACT | AFFILIATE >,
"is_inbound" : <boolean>
}
}Chatroom Status Update (Active/Deactive/Expired)
Version 1.0 & 1.1
{
"type": CHATROOM_ACTIVATED | CHATROOM_DEACTIVATED | CHATROOM_EXPIRED,
"version":<double>,
"payload": {
"chatroom_id": <string>,
"chatroom_type": <enum CONTACT | AFFILIATE >,
"status_update_ts": timestamp
}
}Contact Expired
Version 1.0 & 1.1
{
"type": CONTACT_EXPIRED,
"version":<double>,
"payload": {
"contact_id": <string>
}
}Send Template Message
Version 1.0 & 1.1
{
"type": SEND_TEMPLATE_MESSAGE_STATUS,
"version":<double>,
"payload": {
"request_id": <string>,
"chatroom_id": <string>,
"remote_phone_id": <string>,
"remote_waba_id": <string>,
"remote_template_id": <string>,
"status": <enum PERMANENTLY_FAILED | DELIVERED>,
"err_code": <String>,
"err_reason": <String>
}
}Media Received
Version 1.0 & 1.1
This webhook will be retried for a maximum of 3 days before being marked as failed.
{
"type": MEDIA_FILE,
"version":<double>,
"payload": {
"phone_number": <e164_format string>,
"file_name": <string>,
"mime_type": <string>,
"remote_phone_id": <string>,
"remote_waba_id": <string>,
"chatroom_id": <string>,
"org_id": <string>,
"media_id": <String>
}
}Media Received with Classification
Version 1.0 & 1.1
{
"type": MEDIA_FILE_WITH_CLASSIFICATION,
"version":<double>,
"payload": {
"phone_number": <e164_format string>,
"file_name": <string>,
"mime_type": <string>,
"remote_phone_id": <string>,
"remote_waba_id": <string>,
"chatroom_id": <string>,
"org_id": <string>,
"media_id": <String>,
"classification": {
"suggested_labels": list<string>,
"suggested_labels_status": <enum ACCEPTED | REJECTED>,
"user_input_labels": list<string>
}
}
}Contact Opt Out Webhook
Version 1.0 & 1.1
{
"type": CONTACT_OPT_OUT,
"version":<double>,
"payload": {
"phone_number": <e164_format string>,
"chatroom_id": <string>,
"opt_out_ts": <timestamp>,
"opt_out_source": {
"type": <enum TEMPLATE_BUTTON>,
"template_id" : <string>,
"button_id": <string>
}
}
}Analytics Dump
Version 1.0 & 1.1
Note that the file format may vary based on webhook version.
For more details refer to Metric Dumps
{
"type": ANALYTICS_DUMP_FILE,
"version" : <double>
"payload": {
"metric_type": <string>,
"granualarity": <enum DAILY | WEEKLY>,
"start_time": <timestamp>,
"file_id": <string>
}
}For downloading the file use the download signed URL API with the above obtained file_id
Analytics Metric Type:
MESSAGE_DUMP
AGENT_ANALYTICS
Last updated