V3 Departments API
The V3 departments API is deprecated. The following routes will stop responding starting from September 2026:
GET /api/v3/departmentsGET /api/v3/departments/{id}GET /api/v3/departments/tree
V4 Departments API
The V4 departments API has no announced sunset date, but the Lucca API (V5) is the long-term strategic target.If you are on V3 and want a lower-friction interim step (same API-key authentication), you may migrate to V4 first —
but a future migration to the V5 Lucca API will still be required.
The V5 Lucca API departments API endpoints are stable and will not undergo breaking changes. It supports both read and
write operations. We recommend moving to the Lucca API as soon as possible to take advantage of its improved performance,
richer data model, and long-term support.
Before You Start: Switch to OAuth 2.0
Regardless of your starting version, the Lucca API requires an OAuth 2.0 bearer token in place of the legacy API key. Request the scope that matches your use case:
Additionally, all requests must include the
Api-Version: 2024-11-01 HTTP header.
Authentication
How to obtain and use OAuth 2.0 bearer tokens with the Lucca authorization server.
Versioning
How to use the
Api-Version header to specify the API version.Pick Your Starting Version
- Migrating from V3
- Migrating from V4
Quick Start
1
Get an OAuth 2.0 token
Request a bearer token with the
departments.readonly scope (add departments.readwrite if needed). See the auth section above.2
Add the Api-Version header
Include
Api-Version: 2024-11-01 on every request.3
Replace the list endpoint
Swap
GET /api/v3/departments?paging=0,1000 for GET /lucca-api/departments?include=links. Page through results using the cursor token in links.next.4
Update your data model
Refer to the field mapping reference below for all changes.
5
Replace embedded user lists
The
users, currentUsers, and currentUsersCount fields no longer appear on department objects.
Use GET /lucca-api/employees?applicableJobPosition.department.id={id}&status=active&include=totalCount instead.What Changes
- Authentication: v3 uses a proprietary API key; the Lucca API uses OAuth 2.0 bearer tokens.
- Versioning: requests must include the
Api-Version: 2024-11-01HTTP header. isActive→isArchived: the boolean is semantically inverted.code→remoteId.parentIdis nowparent: was an opaque hierarchy path string (e.g."/1/2/"); now a typed{ id, type, url }reference object.- IDs become strings: integers in v3 (
32), strings in v5 ("32"). - No embedded
users/currentUsers: use thelinks.activeEmployeesor theemployeesAPI endpoint filtered by department ID. - Pagination: v3 used
?paging={offset},{limit}; the Lucca API uses cursor tokens. Max 100 items per page (default 25). - Write operations (new in v5):
POSTandPATCHare now available. v3 had no write endpoints.
Pagination
How cursor-based pagination works in the Lucca API.
Notable Breaking Changes
isActive is now isArchived (inverted semantics)
A department can only be archived when no employees are currently attached to it.
IDs became strings in v5
parent became a typed reference object in v5
In v3, parentId in the response was an opaque hierarchy path string (e.g. "/1/2/"), not a numeric ID. In v5, the parent is a typed reference:"parent": null. Use parent.id to navigate the hierarchy.Field code was renamed remoteId
Map v3 code to v5 remoteId. Use it for external identifiers.Embedded users and currentUsers fields were removed
v3 department objects included users, currentUsers, and currentUsersCount directly on the department. In v5, you may either
follow the activeEmployees link (only returned when include=links is specified) or build the link to the employees endpoint manually:ActiveEmployees link
Building the link manually
totalCount in the response is the equivalent of currentUsersCount. Each department also exposes a pre-built links.activeEmployees.href pointing to this query.Migration by Use Case
1. List All Departments
2. Retrieve a Department by ID
3. Filter by Active / Archived Status
4. Navigate the Hierarchy
V3 supported a?parentId={integer} query filter to retrieve direct children of a department. v5 has no server-side equivalent — page through all departments and group by parent.id client-side. The level field (1 = root) and sortOrder (0-based among siblings) help reconstruct the correct display order.5. Find Employees in a Department
V3 embeddedcurrentUsers directly on each department object. In v5, use activeEmployees link (to obtain it, add ?include=links) or query the employees endpoint directly:totalCount field in the response is the equivalent of the old currentUsersCount.Field Mapping Reference
Writing Departments (New in v5)
Neither v3 nor v4 officially exposed write endpoints. The Lucca API introducesPOST (create) and PATCH (update) operations,
both requiring the departments.readwrite scope.
There is no
DELETE endpoint for departments. To decommission a department, set isArchived: true via PATCH.
A department can only be archived when no employees are currently attached to it.Create a Department
V5
201 Created, the full department representation, and a Location header pointing to the new resource URL.
Update a Department
UsePATCH with a partial body — only the fields you include will be updated:
V5
Further Reading
Lucca API Introduction
Overview of the Lucca API, versioning, and pagination.
V5 Department Reference
Full reference for the Lucca API department resource.
Authentication
How to obtain and use OAuth 2.0 bearer tokens.
Pagination
Cursor-based pagination in the Lucca API, with examples.
Rate Limits
Rate and size limits applied to the Lucca API.