Supported webhook events in Bevatel

Supported webhook events in Bevatel

"Explore Bevatel's supported webhook events to stay updated on conversation, message, and status changes with customizable payloads."

Supported webhook events in Bevatel

Bevatel publishes various events to the configured webhook endpoints. If you want to configure a webhook, refer to the guide here.

Each event has its payload structure based on the type of model they are acting on. The following section describes the main objects we use in Bevatel and their attributes.

Objects

An event can contain any of the following objects as a payload. Different types of objects supported in Bevatel are as follows.

Account

The following payload will be returned for an account.

  1. {
  2.   "id": "integer",
  3.   "name": "string"
  4. }

Inbox

The following payload will be returned for an inbox.


  1. {
  2.   "id": "integer",
  3.   "name": "string"
  4. }

Contact

The following payload will be returned for a contact.

  1. {
  2.   "id": "integer",
  3.   "name": "string",
  4.   "avatar": "string",
  5.   "type": "contact",
  6.   "account": {
  7.     // <...Account Object>
  8.   }
  9. }

User

The following payload will be returned for an agent/admin.

  1. {
  2. "id": "integer",
  3. "name": "string",
  4. "email": "string",
  5. "type": "user"
  6. }

Conversation

The following payload will be returned for a conversation.

  1. {
  2.   "additional_attributes": {
  3.     "browser": {
  4.       "device_name": "string",
  5.       "browser_name": "string",
  6.       "platform_name": "string",
  7.       "browser_version": "string",
  8.       "platform_version": "string"
  9.     },
  10.     "referer": "string",
  11.     "initiated_at": {
  12.       "timestamp": "iso-datetime"
  13.     }
  14.   },
  15.   "can_reply": "boolean",
  16.   "channel": "string",
  17.   "id": "integer",
  18.   "inbox_id": "integer",
  19.   "contact_inbox": {
  20.     "id": "integer",
  21.     "contact_id": "integer",
  22.     "inbox_id": "integer",
  23.     "source_id": "string",
  24.     "created_at": "datetime",
  25.     "updated_at": "datetime",
  26.     "hmac_verified": "boolean"
  27.   },
  28.   "messages": ["Array of message objects"],
  29.   "meta": {
  30.     "sender": {
  31.       // Contact Object
  32.     },
  33.     "assignee": {
  34.       // User Object
  35.     }
  36.   },
  37.   "status": "string",
  38.   "unread_count": "integer",
  39.   "agent_last_seen_at": "unix-timestamp",
  40.   "contact_last_seen_at": "unix-timestamp",
  41.   "timestamp": "unix-timestamp",
  42.   "account_id": "integer"
  43. }

Message

  1. {
  2.   "id": "integer",
  3.   "content": "string",
  4.   "message_type": "integer",
  5.   "created_at": "unix-timestamp",
  6.   "private": "boolean",
  7.   "source_id": "string / null",
  8.   "content_type": "string",
  9.   "content_attributes": "object",
  10.   "sender": {
  11.     "type": "string - contact/user"
  12.     // User or Contact Object
  13.   },
  14.   "account": {
  15.     // Account Object
  16.   },
  17.   "conversation": {
  18.     // Conversation Object
  19.   },
  20.   "inbox": {
  21.     // Inbox Object
  22.   }
  23. }

A sample webhook payload

  1. {
  2.   "event": "event_name"
  3.   // Attributes related to the event
  4. }

Webhook Events

Bevatel supports the following webhook events. You can subscribe to them while configuring a webhook in the dashboard or using the API.

conversation_created

This event will be triggered when a new conversation is created in the account. The payload for the event is as follows.

  1. {
  2.   "event": "conversation_created"
  3.   // <...Conversation Attributes>
  4. }

  1. {
  2.   "event": "conversation_created"
  3.   // <...Conversation Attributes>
  4. }

conversation_updated

This event will be triggered when there is a change in any of the attributes in the conversation.

  1. {
  2.   "event": "conversation_updated",
  3.   "changed_attributes": [
  4.     {
  5.       "<attribute_name>": {
  6.         "current_value": "",
  7.         "previous_value": ""
  8.       }
  9.     }
  10.   ]
  11.   // <...Conversation Attributes>
  12. }

conversation_status_changed

This event will be triggered when the status of the conversation is changed.

Note: If you are using agent bot APIs instead of webhooks, this event is not supported yet.

message_created​

This event will be triggered when a message is created in a conversation. The payload for the event is as follows.
  1. {
  2.   "event": "message_created"
  3.   // <...Message Attributes>
  4. }

message_updated

This event will be triggered when a message is updated in a conversation. The payload for the event is as follows.

  1. {
  2.   "event": "message_updated"
  3.   // <...Message Attributes>
  4. }

webwidget_triggered​

This event will be triggered when the end-user opens the live-chat widget.

  1. {
  2.   "id": ,
  3.   "contact": {
  4.     // <...Contact Object>
  5.   },
  6.   "inbox": {
  7.     // <...Inbox Object>
  8.   },
  9.   "account": {
  10.     // <...Account Object>
  11.   },
  12.   "current_conversation": {
  13.     // <...Conversation Object>
  14.   },
  15.   "source_id": "string",
  16.   "event": "webwidget_triggered",
  17.   "event_info": {
  18.     "initiated_at": {
  19.       "timestamp": "date-string"
  20.     },
  21.     "referer": "string",
  22.     "widget_language": "string",
  23.     "browser_language": "string",
  24.     "browser": {
  25.       "browser_name": "string",
  26.       "browser_version": "string",
  27.       "device_name": "string",
  28.       "platform_name": "string",
  29.       "platform_version": "string"
  30.     }
  31.   }
  32. }

    • Related Articles

    • Create your Bevatel Account

      Welcome to Bevatel! This guide will walk you through the steps to create your account and get started with our services. 1. Introduction Creating an account with Bevatel is the first step to accessing our services and unlocking a world of ...
    • Configure Webhooks

      "Get started with webhooks in Bevatel, enabling HTTP callbacks triggered by events like message creation to enhance integration and automation." Getting started with webhooks in Bevatel Webhooks are HTTP callbacks that are defined in every account. ...
    • Multilingual support

      "Bevatel offers native support for 2 different languages, allowing users to easily configure the dashboard in their preferred language via Profile Settings." Multilingual support Bevatel natively supports 2 different languages. The section below ...
    • Integrations

      This guide will walk you through the different sections of the Bevatel integration module, including how to enable, configure, and manage various integrations for your business. 1. Accessing the Integration Module To access the integration module: ...
    • Audit Logs

      "Audit Logs in Bevatel's Enterprise feature provide a comprehensive record of account activities, answering who did what, when, and from where, enabling thorough account, team, and service auditing." Audit Logs Audit Logs is an Enterprise feature. ...