Chat Management
Monitor and manage conversations across all channels
Overview
The Chats section is your command center for all customer conversations across every connected channel — Telegram, Instagram, WhatsApp, Facebook, Viber, and voice calls.
For the full API reference, see api.happ.tools/reference.
Chat Dashboard
Navigate to Chats in the sidebar.
Chat List
Each conversation shows:
- Contact name — Customer's name or username
- Channel badge — Color-coded messenger icon
- Last message — Preview of the most recent message
- Timestamp — When the last message was sent
- AI status — Whether AI is actively managing the conversation
Channel Colors
| Channel | Color |
|---|---|
| Telegram | Blue (#0088CC) |
| Pink (#E4405F) | |
| Green (#25D366) | |
| Blue (#1877F2) | |
| Viber | Purple (#665CAC) |
Conversation View
Click any chat to open:
- Full message history — Every message between customer and assistant
- Message roles — User, Assistant, or System labels
- Timestamps — When each message was sent
- Token usage — Per-message input/output tokens and model used
AI Control
Toggle AI for any conversation. See AI Control & Human Handoff for full details.
- AI On — Assistant responds automatically
- AI Off — Human operator handles the conversation
Sending Messages Manually
When AI is off (or alongside AI), send messages from the dashboard:
- Open a chat
- Type your message
- Send
The message is delivered to the customer's messenger and appears in the conversation history.
Via API
POST /api/chats/{chatId}/messages
X-Access-Token: happ_your_token_here
Content-Type: application/json
{
"content": "Hello, let me help you with that!"
}Creating a Chat
POST /api/chats
X-Access-Token: happ_your_token_here
Content-Type: application/json
{
"assistantId": "your-assistant-uuid"
}Listing Messages
GET /api/chats/{chatId}/messages?page=1&take=20
X-Access-Token: happ_your_token_hereLast Messages Preview
Get the latest message for multiple chats at once (useful for chat list UI):
GET /api/messages/last?chatIds=id1,id2,id3
X-Access-Token: happ_your_token_hereChat Types
| Type | Description |
|---|---|
| Private | One-on-one customer conversation |
| Group | Group chat (primarily Telegram) |
| Channel | Broadcast channel messages |
Message Roles
| Role | Description |
|---|---|
User | Message from the customer |
Assistant | AI-generated response |
System | System-level messages |
Developer | Developer/admin messages |
Message Sources
Messages are tagged by where they came from:
| Source | Description |
|---|---|
TELEGRAM, INSTAGRAM, WHATSAPP, MESSENGER, ECHAT | Incoming from messengers |
SAAS | Sent from web dashboard |
MOBILE | Sent from mobile app |
API | Sent via REST API |
AI | Generated by the AI assistant |
Real-Time Updates
All chat events are broadcast via WebSocket:
WebSocket URL: wss://api.happ.tools/wsEvents:
MESSAGE_CREATED— New message in any chatCHAT_MODE_CHANGED— AI mode toggled on/offCHAT_CREATED— New conversation started
Connect and join your company room to receive events for all chats.
Context Window
The AI sees only recent messages (~last 10 minutes). Older messages are archived but preserved in the database. See AI Control > Context Window for details.
Tips
- Check daily — Review conversations to improve your assistant's knowledge and prompt
- Use filters — Filter by channel or AI status for high-volume management
- Quick takeover — Toggle AI off to personally handle sensitive conversations
- Review token usage — Check per-message tokens to optimize model selection