Skip to main content

What are Departments?

Departments allow you to organize your team into groups (e.g., Sales, Support, Finance) and control which conversations each group can view.

Organization

Group users by function or area of expertise

Visibility

Operators only see conversations from their department

Visibility Rules

RoleVisible Conversations
Owner / AdminAll conversations (with optional department filter)
Operator with departmentTheir department’s conversations + unassigned conversations
Operator without departmentOnly unassigned conversations

Department Model

{
  "id": "uuid",
  "tenant_id": "uuid",
  "name": "Sales",
  "description": "Sales team",
  "member_count": 5,
  "created_at": "2024-01-15T10:00:00Z",
  "updated_at": "2024-01-15T10:00:00Z"
}

Endpoints

MethodEndpointDescription
GET/backend/departmentsList departments
GET/backend/departments/myMy departments
POST/backend/departmentsCreate department
GET/backend/departments/{id}Get department
PUT/backend/departments/{id}Update department
DELETE/backend/departments/{id}Delete department
GET/backend/departments/{id}/membersList members
POST/backend/departments/{id}/membersAdd member
DELETE/backend/departments/{id}/members/{userId}Remove member

Permissions (RBAC)

  • Admin/Owner: Full access (department and member CRUD)
  • Operator: Only GET /departments/my (view their own departments)