API Channel

API Channel

Create Channel

Effortlessly set up an API channel inbox in Bevatel, allowing you to send and receive messages using Bevatel APIs with simple configuration steps.

How to create an API channel inbox?


Setting up an API channel consists of the following steps.

  1. Create API Channel inbox
  2. Send messages using Bevatel APIs
  3. Receive webhooks on new messages from Bevatel

This document allows you to create and configure an API channel inbox in Bevatel installations.

Step 1: Go to Settings > Channels and click on "Add Channel".

Step 2: Select API from the list of channels.



Step 3: Provide a name for the channel and a callback URL (the events and corresponding payload are defined in 
the subsequent articles)


Step 4: Add agents to the channel



Step 5: Hooray!! The inbox setup is complete.





Now the channel setup is complete, let us try to send a message using Bevatel APIs.


When the user tries to edit the inbox configuration

In the inbox configuration's collaborators section:

  • When you add an agent in the Agent field, any user designated as an agent can see and access this inbox from the Conversation module. They can manage conversations in this inbox.
  • However, when you add a team in the Team field, users attempting to assign conversations to a specific team from the Conversation module will only see the teams that have been added to the related inbox. This restricts conversation assignment options to the teams associated with the particular inbox, ensuring that conversations are appropriately distributed among the specified teams.




Send Messages via Bevatel API Channel 

This guide explains how to send messages through the Bevatel API Channel using the latest webhook endpoint. The updated API streamlines the workflow into a single request, eliminating the need for separate contact or conversation creation.


Key Concepts

  • Inbox: Represents a communication channel such as WhatsApp, Facebook, or API.

  • Contact: A real-world user involved in the messaging.

  • Conversation: Automatically handled by the system upon sending a message.

  • Message: The actual text sent between an agent and a contact.


Endpoint

  1. POST https://chat.bevatel.com/webhooks/api_channel

Headers

The following headers must be included in every API request:

If everything is successful, you will see the conversation on the dashboard as follows.


Header Key
 Description
 Example
api_access_token
Token from your profile
 A97e41kmXviAw94f3QsJMfc6q
api_account_id
Your Bevatel account ID
 97
Content-Type
Request format
application/json

Request Body

You must include three elements:

  1. Inbox ID – identifies the API channel inbox

  2. Contact Info – either phone_number or contact_id

  3. Message Content – the actual message you want to send

The body of the request must be formatted in JSON. Here's the structure:

{ "inbox_id": , "contact": { "phone_number": "" // Optional if the contact already exists: // "contact_id": }, "message": { "content": "Hello world, you are my favourite message" } }






You will be notified when a new message is created on the URL specified while creating the API channel.


 



    • Related Articles

    • Whatsapp API

      Connecting to WhatsApp API via Embedded Signup: Step-by-Step Guide Step 1: Choose Channel Navigate to Channels: On the left menu, select Settings, then Channels. Select WhatsApp API as the channel. Click Continue to proceed with connecting via ...
    • WhatsApp Cloud

      This guide walks you through how to integrate a WhatsApp Cloud API with Bevatel's Business Chat system. It includes API setup, webhook configuration, agent assignment, and final channel verification. Step 1: Choose Your API Provider Navigate to ...
    • Add Channels

      "Connect your website and social media accounts like Facebook, Twitter, WhatsApp, and more with Bevatel by adding inboxes. Access this feature through Welcome/onboarding, Settings, or your home screen Add Channels An Inbox connects your website, or ...
    • Telegram

      Setting Up Telegram Channels in Bevatel Effortlessly set up a Telegram channel in Bevatel by following simple steps, including creating a Telegram bot and adding agents, enabling efficient communication with your audience. How to create a Telegram ...
    • Contacts

      "Use date and source filters. Contacts Chart tracks changes, Contact Source shows acquisition channels, and Contact Logs offer detailed activity records." Frequency and date — Select a date range from the drop-down list to be applied to the report. ...