Skip to main content

List Members

GET /backend/departments/{id}/members
Response (200):
{
  "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

POST /backend/departments/{id}/members
Body:
{
  "user_id": "550e8400-e29b-41d4-a716-446655440000"
}
FieldTypeRequiredDescription
user_idUUIDYesUser ID to add
Response (200):
{
  "message": "Member added successfully"
}
Returns 409 Conflict if the user is already a member of the department.

Remove Member

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.