Retrieve the full hierarchical tree of departments within an organization.
GEThttps://api.aitronos.com/v1/organizations/{organization_id}/departments/tree
Returns a nested tree structure of all departments in the organization. Each node includes its children as a nested array, allowing you to render the full hierarchy in a single request. Optionally scope the tree to specific departments and their descendants.
organization_id string required
The unique identifier of the organization (format: org_*).
scope string optional
Comma-separated list of department IDs to scope the tree. When provided, only the specified departments and their descendants are returned.
An array of department tree objects. Each object contains the standard department fields plus a children array with nested department tree objects.
cURL
- Bash
- Python
- Python
- JavaScript
curl https://api.aitronos.com/v1/organizations/org_xyz789/departments/tree \
-H "Authorization: Bearer $ACCESS_TOKEN"