In Akece, you can configure a support channel using the API, allowing you to integrate a custom messaging system directly into the platform. This type of channel is ideal when you want to build your own customer support interface or connect Akece with another system.
How to Set Up an API Channel
1. Create the Channel
-
Go to Settings → Inboxes
-
Click on Add Inbox
-
Select the API option
-
Enter a name for the channel
-
Add a callback URL – this is where Akece will send notifications when a new message is created
-
Add the agents who should have access to this inbox
✅ The channel is now ready to use.
How to Send Messages via the API
The message flow through the API involves three main steps:
1. Create the Contact
Use the Create Contact API, passing the inbox_id
of the API channel along with the contact details. This will automatically create a session for the contact.
In the API response, locate the source_id
field within contact_inboxes
. This source_id
identifies the session and will be used in the next step.
2. Create a Conversation
Use the source_id
to initiate a new conversation. The response will include a conversation_id
, which will be used to send messages.
3. Send a Message
With the conversation_id
, you can send messages using the API. Messages can be of the following types:
-
incoming
– messages sent by the contact -
outgoing
– messages sent by the agent
How to Receive Messages in the Callback
When a new message is received in this channel, Akece will send a POST request to the callback URL specified when creating the inbox.
The payload follows the standard webhook format and includes fields such as:
-
event
-
message_type
-
conversation
-
sender
-
and more
This allows you to handle incoming events and sync your system with Akece in real time.
How to Use Client APIs
Akece offers dedicated client-side APIs so you can build your own customer-facing interface.
Examples of use:
-
Build a custom chat widget for your website
-
Integrate the messaging system into a mobile app
-
Connect Akece to third-party platforms without an official SDK
You can use the inbox_identifier
and customer_identifier
to perform actions like:
-
Creating, retrieving, or updating contacts
-
Creating and listing conversations
-
Creating, listing, and updating messages
Check the Client API documentation for full details.
How to Authenticate with HMAC
HMAC authentication ensures secure communication through the API channel. To generate the signature:
-
Obtain the hmac_token from the API inbox configuration in your Akece dashboard
-
Use it to generate the
identifier_hash
-
Include the hash along with the customer's identifier in your API requests
WebSockets and Real-Time Updates
To receive live updates in your frontend, connect to Akece’s WebSocket:
wss://dash.akece.com/cable
Use the pubsub_token
returned when creating the customer to authenticate and listen to events.
Need help configuring your API channel?
Reach out to us:
📩 [email protected] | 📱 @akece.ai