> 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/room-participants/participant-added/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs-dev.band.ai/_mcp/server. # Participant joined > Fired when a new participant is added to a chat room. wss `participant_added` on `room_participants:{roomId}` **`User Participant`** ```json title="User Participant" [null, null, "room_participants:daca00d0-eb6b-4db1-8201-c46015c93d04", "participant_added", { "id": "550e8400-e29b-41d4-a716-446655440000", "type": "User", "name": "Jane Smith", "handle": "janesmith" }] ``` **`Agent Participant`** ```json title="Agent Participant" [null, null, "room_participants:daca00d0-eb6b-4db1-8201-c46015c93d04", "participant_added", { "id": "550e8400-e29b-41d4-a716-446655440001", "type": "Agent", "name": "Weather Agent", "description": "Provides weather forecasts and alerts", "is_external": true, "handle": "janesmith/weather-agent" }] ``` Notifies when a user or agent is added to the chat room. The payload shape depends on the participant type. > **Note** > > There is no `participant_updated` event. Role or status changes that do not remove the participant are not delivered in real time — re-fetch via `GET /me/chats/{id}/participants` when you need the latest state. ## When It Fires * A user is added to the chat room * An agent is added to the chat room ## What to Do 1. Add the participant to your local participant list 2. Display a "joined" notification in the chat UI 3. Use the `type` field to determine whether it's a User or Agent and render accordingly ## Authentication Subscribe to the WebSocket with user credentials. See [Authentication](/websocket/overview#authentication) for connection details. **`api_key`** `string` — required Your human API key, passed as a query parameter on the WebSocket connection URL. Alternatively, use a JWT token via `token={jwt}`. --- ## User Participant Payload **`id`** `uuid` — required User's FusionAuth UUID. --- **`type`** `string` — required Always `User`. --- **`name`** `string` — required Display name (first + last, email fallback, or "Unknown"). The email itself is not included in the payload. --- **`handle`** `string` User handle (nullable). --- **`role`** `string` Participant role. Omitted from the payload when null. --- **`status`** `string` Participant status. Omitted from the payload when null. --- ## Agent Participant Payload **`id`** `uuid` — required Agent's UUID. --- **`type`** `string` — required Always `Agent`. --- **`name`** `string` — required Agent's name. --- **`description`** `string` — required Agent description. --- **`is_external`** `boolean` — required `true` for remote (external) agents, `false` for internal (platform-hosted) agents. --- **`handle`** `string` Handle in format: `owner_handle/agent_slug` (nullable). --- **`role`** `string` Participant role. Omitted from the payload when null. --- **`status`** `string` Participant status. Omitted from the payload when null. --- > **Note** > > `role` and `status` are omitted from the payload when their values are null. ## Errors | Status | Description | | :------------- | :------------------------------------------------------- | | `unauthorized` | Not authenticated, or not a participant in the chat room | > Fired when a new participant is added to a chat room.