For the complete documentation index, see llms.txt. This page is also available as Markdown.

Departments

Introduction

Departments represent organizational units used by roles, user membership, targeting, permissions, and notifications.

Model Definition

Alias

department

Capabilities

  • Targetables - Departments can be selected as explicit targets for supported resources.

  • URL Context - Department URLs resolve to access-checked context.

Relations

Key
Relation
Type
Relation Field(s)

roles

Has many

department_id

users

Has many through roles

Role membership

attributeSets

Morph to many

Target entity type and ID

List

List visible Departments.

Definition

GET /api/departments

Request Keys

Key
Type
Default
Description

selects

string

All fields

Comma-separated fields to return.

relations

string

Default relations

Pipe-separated relations to include.

limit

integer

No limit

Maximum number of departments.

filter

object

No filters

Filters, including tag-aware text search.

Example Request

Example Response

Show

Show one visible Department.

Definition

GET /api/departments/{department}

Route Parameters

Parameter
Type
Description

department

integer

Department ID.

Request Keys

Key
Type
Default
Description

selects

string

All fields

Comma-separated fields to return.

relations

string

Default relations

Pipe-separated relations to include.

Example Request

Example Response

Availability Information

Show availability information for Departments.

Definition

GET /api/departments/availability-information

Example Request

Example Response

Create

Create a new Department.

Definition

POST /api/departments

Request Keys

Key
Type
Default
Description

name*

string

-

Unique department name.

folder_id

integer | null

null

Parent Folder ID.

notification_setting_ids

array

Current or no settings

Notification-setting IDs assigned to the department.

attribute_set_ids

array

Current or no sets

AttributeSets to attach; records may include id and sort_number.

Additional attribute keys

mixed

Defined by set

Values for fields from the attached AttributeSets.

Keys with * are required.

Behavior

The authenticated user becomes user_id. The example attaches the department attribute set and supplies both values needed to materialize those additional attributes.

Example Request

Example Response

Update

Update an existing Department.

Definition

PUT /api/departments/{department}

Route Parameters

Parameter
Type
Description

department

integer

Department ID.

Request Keys

Key
Type
Default
Description

name*

string

-

Unique department name.

folder_id

integer | null

null

Parent Folder ID.

notification_setting_ids

array

Current or no settings

Notification-setting IDs assigned to the department.

attribute_set_ids

array

Current or no sets

AttributeSets to attach; records may include id and sort_number.

Additional attribute keys

mixed

Defined by set

Values for fields from the attached AttributeSets.

Example Request

Example Response

Delete

Delete an existing Department.

Definition

DELETE /api/departments/{department}

Route Parameters

Parameter
Type
Description

department

integer

Department ID.

Example Request

Example Response

Last updated