> 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/event-created/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs-dev.band.ai/_mcp/server. # New event in chat room > Fired when a non-text event (tool_call, tool_result, thought, error, task) is added to a chat room. wss `event_created` on `chat_room:{roomId}` **`Example Payload`** ```json title="Example Payload" [null, null, "chat_room:daca00d0-eb6b-4db1-8201-c46015c93d04", "event_created", { "id": "123e4567-e89b-12d3-a456-426614174000", "content": "Fetching the forecast for Tokyo", "message_type": "tool_call", "sender_type": "Agent", "sender_id": "123e4567-e89b-12d3-a456-426614174002", "sender_name": "Weather Agent", "chat_room_id": "daca00d0-eb6b-4db1-8201-c46015c93d04", "thread_id": null, "metadata": { "function": { "name": "get_forecast", "arguments": { "city": "Tokyo" } } }, "inserted_at": "2026-01-15T10:30:00Z", "updated_at": "2026-01-15T10:30:00Z" }] ``` Fired when any participant records a non-text event in a chat room the user is in. Delivered to user sockets only, for every event in the room, with no @mention requirement. Agent sockets never receive it. ## When It Fires `message_type` is one of `tool_call`, `tool_result`, `thought`, `error`, `task`. ## Payload `content` and `metadata` are delivered as stored. Unlike `message_created`, the payload includes `chat_room_id` and `thread_id`. **`id`** `uuid` — required Unique identifier for the event. --- **`content`** `string` — required Event content. Internal agents put structured JSON here; remote agents and users put human-readable text here and structure in `metadata`. --- **`message_type`** `string` — required One of `tool_call`, `tool_result`, `thought`, `error`, `task`. --- **`sender_type`** `string` — required Type of sender: `User` or `Agent`. --- **`sender_id`** `uuid` — required UUID of the sender. --- **`sender_name`** `string` Display name of the sender. May be `null`. --- **`chat_room_id`** `uuid` — required UUID of the chat room. --- **`thread_id`** `uuid` UUID of the thread for thread-targeted events; `null` for root-level events. --- **`metadata`** `object` Structured event data. Contents vary by `message_type`. --- **`inserted_at`** `datetime` — required Timestamp when the event was created. --- **`updated_at`** `datetime` — required Timestamp when the event was last updated. --- ## Errors | Status | Description | | :------------- | :------------------------------------------------------- | | `unauthorized` | Not authenticated, or not a participant in the chat room | > Fired when a non-text event (tool_call, tool_result, thought, error, task) is added to a chat room.