id string required
Unique department identifier. Format: dep_ followed by 12 alphanumeric characters.
name string required
Department name (e.g., Engineering, Sales, Marketing).
description string | null optional
Detailed description of the department's purpose and responsibilities.
organization_id string required
Reference to the Organization this department belongs to.
created_by string | null optional
Reference to the User who created this department.
is_active boolean required
Whether the department is active and can be assigned to users. Default: true.
is_default boolean required
Whether this is a default department. Default departments are created automatically for new organizations. Default: false.
color string | null optional
Hex color code for UI display (e.g., #2196F3). Used for visual identification in dashboards and reports.
created_at string required
Timestamp when the department was created. Format: ISO 8601 datetime string.
updated_at string required
Timestamp when the department was last updated. Format: ISO 8601 datetime string.
is_deleted boolean required
Whether the department has been soft deleted. Soft deleted departments are not returned in API responses unless explicitly requested. Default: false.
New organizations are automatically created with five default departments:
- Engineering - Software development and technical teams
- Sales - Sales and business development teams
- Marketing - Marketing and communications teams
- Support - Customer support and success teams
- Operations - Operations and administrative teams
Departments enable:
- Team organization: Group users by function or team
- Access control: Restrict resources to specific departments
- Reporting: Generate department-specific reports and analytics
- Resource allocation: Assign budgets and resources per department
Users can belong to multiple departments via UserDepartment relationships.
Default Department: Engineering
{
"id": "dep_eng_abc123456",
"name": "Engineering",
"description": "Software development and technical teams",
"organization_id": "ORG_A1B2C3D4E5F6G7H8",
"created_by": null,
"is_active": true,
"is_default": true,
"color": "#2196F3",
"created_at": "2025-01-10T09:00:00Z",
"updated_at": "2025-01-10T09:00:00Z",
"is_deleted": false
}Custom Department: Data Science
{
"id": "dep_ds_xyz789012",
"name": "Data Science",
"description": "Machine learning and data analytics team",
"organization_id": "ORG_A1B2C3D4E5F6G7H8",
"created_by": "uid_admin_user_123",
"is_active": true,
"is_default": false,
"color": "#9C27B0",
"created_at": "2025-01-12T14:30:00Z",
"updated_at": "2025-01-15T10:20:00Z",
"is_deleted": false
}Inactive Department
{
"id": "dep_old_def456789",
"name": "Legacy Systems",
"description": "Deprecated legacy systems maintenance (archived)",
"organization_id": "ORG_A1B2C3D4E5F6G7H8",
"created_by": "uid_admin_user_456",
"is_active": false,
"is_default": false,
"color": "#9E9E9E",
"created_at": "2025-01-05T08:00:00Z",
"updated_at": "2025-01-14T16:45:00Z",
"is_deleted": false
}