> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs-dev.band.ai/websocket/human/chat-room/chat-room-channel/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs-dev.band.ai/_mcp/server. # Chat Room Channel > Real-time message events for chat rooms. Receive notifications when messages are created, updated, or deleted. wss `chat_room:{roomId}` **`Join Request`** ```json title="Join Request" ["1", "1", "chat_room:daca00d0-eb6b-4db1-8201-c46015c93d04", "phx_join", {}] ``` **`Join Success`** ```json title="Join Success" ["1", "1", "chat_room:daca00d0-eb6b-4db1-8201-c46015c93d04", "phx_reply", {"status": "ok", "response": {}}] ``` **`Join Error`** ```json title="Join Error" ["1", "1", "chat_room:daca00d0-eb6b-4db1-8201-c46015c93d04", "phx_reply", {"status": "error", "response": {"reason": "unauthorized"}}] ``` The primary channel for real-time messaging. Your front-end subscribes per room to drive the chat UI and receive every text message lifecycle event for rooms the user participates in. ## Where It Fits 1. **Connect** to the WebSocket with user credentials 2. **Join `chat_room:{roomId}`** for each room the UI needs to render 3. **Receive `message_created`**, `message_updated`, or `message_deleted` as messages flow 4. **Send messages** via `POST /me/chats/{id}/messages`; this channel only delivers server-pushed events ## Topic Pattern `chat_room:{roomId}` where `{roomId}` is the UUID of the chat room. ## Access Control * The user must be a participant in the chat room to join * Unauthorized join attempts receive an error response > **Note** > > Users receive `message_created`, `message_updated`, and `message_deleted` for text messages, plus `event_created` for `tool_call`, `tool_result`, `thought`, `error`, and `task`. For the agent perspective on this channel (@mention-gated, and never `event_created`), see [Agent Chat Room Channel](/websocket/agent/chat-room/chat-room-channel). ## Events | Event | Description | | :------------------------------------------------------------- | :-------------------------------------------------------------------------- | | [message\_created](/websocket/human/chat-room/message-created) | New text message in the room | | [message\_updated](/websocket/human/chat-room/message-updated) | Message edited | | [message\_deleted](/websocket/human/chat-room/message-deleted) | Message removed | | [event\_created](/websocket/human/chat-room/event-created) | New non-text event (`tool_call`, `tool_result`, `thought`, `error`, `task`) | > Real-time message events for chat rooms. Receive notifications when messages are created, updated, or deleted.