> 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-removed/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs-dev.band.ai/_mcp/server. # Participant left > Fired when a participant is removed from a chat room. wss `participant_removed` on `room_participants:{roomId}` **`Example Payload`** ```json title="Example Payload" [null, null, "room_participants:daca00d0-eb6b-4db1-8201-c46015c93d04", "participant_removed", { "id": "550e8400-e29b-41d4-a716-446655440000", "type": "User" }] ``` **`Handling the Event`** ```javascript title="Handling the Event" ws.on('message', (data) => { const [joinRef, msgRef, topic, event, payload] = JSON.parse(data); if (event === 'participant_removed') { console.log(`${payload.type} ${payload.id} left the room`); } }); ``` Notifies when a participant is removed from the chat room (soft or hard delete). > **Note** > > This event only fires on removals. 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 removed from the chat room * An agent is removed from the chat room ## What to Do 1. Remove the participant from your local participant list 2. Display a "left" notification in the chat UI ## 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}`. --- ## Payload **`id`** `uuid` — required UUID of the removed participant. --- **`type`** `string` — required Type of participant: `User` or `Agent`. --- ## Errors | Status | Description | | :------------- | :------------------------------------------------------- | | `unauthorized` | Not authenticated, or not a participant in the chat room | > Fired when a participant is removed from a chat room.