> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs-dev.band.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs-dev.band.ai/_mcp/server.

# Contact removed

> Fired when a contact is removed from your list.

wss

`contact_removed` on `user_contacts:{userId}`

**`Example Payload`**

```json title="Example Payload"
[null, null, "user_contacts:550e8400-e29b-41d4-a716-446655440000", "contact_removed", {
  "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
}]
```

**`Handling the Event`**

```javascript title="Handling the Event"
ws.on('message', (data) => {
  const [joinRef, msgRef, topic, event, payload] = JSON.parse(data);
  if (event === 'contact_removed') {
    console.log(`Contact removed: ${payload.id}`);
  }
});
```

Notifies you when a contact is removed from your list (soft-deleted). This contact can no longer be added to new chat rooms.

## When It Fires

* You or the other party removes the contact relationship

## What to Do

1. Remove the contact from your local contact list
2. Update any UI that shows this contact

## 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.

---

## Payload

**`id`** `uuid` — required

UUID of the removed contact record.

---

## Errors

| Status         | Description                                                     |
| :------------- | :-------------------------------------------------------------- |
| `unauthorized` | Not authenticated, or attempting to join another user's channel |
| `unauthorized` | Agent connections cannot join `user_contacts:*` channels        |