Channels
Deploy your agents across channels. The REST API and Web Widget are available now. WhatsApp, Telegram, Email, and SMS are coming soon.
Channel Status
REST API
Always enabled. Use HTTP requests to chat with agents.
Web Widget
Embed a chat widget using a single script tag.
Connect via WAHA or WhatsApp Business API.
Telegram
Telegram bot integration.
Inbound email via Resend.
SMS
Twilio or Africa's Talking SMS.
REST API
The REST API is always enabled for all agents. See the API Reference for full documentation.
Chat with an agent
curl -X POST "https://dev.usebelha.com/api/agents?id=ag_xxx&action=chat" \
-H "Content-Type: application/json" \
-H "x-api-key: your-key" \
-d '{"sessionId": "user_123", "message": "Hello!"}'Chat with a template (no agent required)
curl -X POST "https://dev.usebelha.com/api/agents?template=tpl_search&action=chat" \
-H "Content-Type: application/json" \
-H "x-tenant-id: tenant_demo" \
-d '{"sessionId": "test", "message": "Latest news?"}'Web Widget
Embed a chat widget on your site by loading widget.js from your UseBelha deployment:
<script src="https://dev.usebelha.com/widget.js"></script>
<belha-chat
agent-id="ag_xxx"
title="Support"
base-url="https://dev.usebelha.com"
primary-color="#6366f1"
position="bottom-right"
></belha-chat>External embeds
If you embed on a different domain, you’ll need a dedicated public/embed key to authenticate widget chats. This is not implemented yet — same-origin cookies work for logged-in users.
Widget Configuration
| Attribute | Description | Default |
|---|---|---|
agent-id | Agent ID to chat with | Required |
primary-color | Theme color (hex) | #6366f1 |
position | bottom-right or bottom-left | bottom-right |
title | Widget title | Chat |
greeting | Initial greeting message | Hello! How can I help you today? |
base-url | UseBelha host to load the iframe from (optional) | Script origin |
Channel Configuration
Channels are configured per agent:
{
"channels": {
"api": true,
"widget": {
"enabled": true,
"primaryColor": "#6366f1",
"greeting": "Hi! How can I help?"
}
}
}Coming Soon
Connect via WAHA (WhatsApp HTTP API) or the official WhatsApp Business API.
Telegram
Create a Telegram bot and connect it to your agent.
Inbound email + agent replies.
SMS
Twilio or Africa's Talking SMS for markets where WhatsApp isn't dominant.
Want these sooner?
Open an issue on GitHub to vote for the channels you need most.