Departments

List all departments in the organization

GET
/api/departments

Return every department for the caller's organization with populated managerIds, userIds, createdBy, and updatedBy references. Powers the org-admin departments list view.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/departments"
{  "departments": [    {      "_id": "65c1a0b0c0d0e0f0a0b0c0d1",      "name": "Sales",      "organizationId": "65a0e0e0e0e0e0e0e0e0e0e0"    },    {      "_id": "65c1a0b0c0d0e0f0a0b0c0d2",      "name": "Support",      "organizationId": "65a0e0e0e0e0e0e0e0e0e0e0"    }  ]}