> ## Documentation Index
> Fetch the complete documentation index at: https://docs.leavo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Members

> Manage department members

## List Members

```bash theme={null}
GET /backend/departments/{id}/members
```

**Response (200):**

```json theme={null}
{
  "data": [
    {
      "id": "uuid",
      "department_id": "uuid",
      "user_id": "uuid",
      "user_name": "John Smith",
      "user_email": "john@example.com",
      "created_at": "2024-01-15T10:00:00Z"
    }
  ]
}
```

## Add Member

```bash theme={null}
POST /backend/departments/{id}/members
```

**Body:**

```json theme={null}
{
  "user_id": "550e8400-e29b-41d4-a716-446655440000"
}
```

| Field     | Type | Required | Description    |
| --------- | ---- | -------- | -------------- |
| `user_id` | UUID | Yes      | User ID to add |

**Response (200):**

```json theme={null}
{
  "message": "Member added successfully"
}
```

<Warning>
  Returns **409 Conflict** if the user is already a member of the department.
</Warning>

## Remove Member

```bash theme={null}
DELETE /backend/departments/{id}/members/{userId}
```

**Response:** 204 No Content

## Impact on Visibility

When an operator is added to a department, they can see:

1. Conversations assigned to their department
2. Unassigned conversations (without any department)

When removed from all departments, the operator only sees unassigned conversations.
