Effortlessly set up an API channel inbox in Bevatel, allowing you to send and receive messages using Bevatel APIs with simple configuration steps.
Setting up an API channel consists of the following steps.
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:
This guide explains how to send messag
es 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.
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.
The following headers must be included in every API request:
If everything is successful, you will see the conversation on the dashboard as follows.
| Description | Example | |||||
|
| A97e41kmXviAw94f3QsJMfc6q | |||||
api_account_id |
| 97 | |||||
|
|
|
You must include three elements:
Inbox ID – identifies the API channel inbox
Contact Info – either phone_number or contact_id
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.