# List department members Retrieve all members of a specific department. Returns a list of all users who are members of the specified department. Each entry includes the user's basic profile information and the date they were added to the department. #### Path Parameters **`organization_id`** string required The unique identifier of the organization (format: `org_*`). **`department_id`** string required The unique identifier of the department (format: `dept_*`). ## Returns An array of department member objects. Request ```bash cURL curl https://api.aitronos.com/v1/organizations/org_xyz789/departments/dept_abc123/members \ -H "Authorization: Bearer $ACCESS_TOKEN" ``` ```python Python SDK from aitronos import Aitronos client = Aitronos(api_key="your-api-key") # Department endpoints coming to SDK soon # result = client.departments.list_members( # organization_id="org_xyz789", # department_id="dept_abc123", # ) ``` ```python Python import requests org_id = "org_xyz789" dept_id = "dept_abc123" url = f"https://api.aitronos.com/v1/organizations/{org_id}/departments/{dept_id}/members" headers = {"Authorization": "Bearer YOUR_ACCESS_TOKEN"} response = requests.get(url, headers=headers) members = response.json() print(members) ``` ```javascript JavaScript const orgId = "org_xyz789"; const deptId = "dept_abc123"; const response = await fetch( `https://api.aitronos.com/v1/organizations/${orgId}/departments/${deptId}/members`, { headers: { "Authorization": `Bearer ${accessToken}` }, } ); const members = await response.json(); console.log(members); ``` Response ```json 200 OK [ { "user_id": "usr_abc123", "full_name": "John Doe", "email": "john@company.com", "added_at": "2025-06-15T09:30:00Z" }, { "user_id": "usr_def456", "full_name": "Jane Smith", "email": "jane@company.com", "added_at": "2025-06-16T11:00:00Z" } ] ``` ```json 404 Error { "success": false, "error": { "code": "DEPARTMENT_NOT_FOUND", "message": "The requested department could not be found.", "system_message": "Department not found", "type": "client_error", "status": 404, "details": { "department_id": "dept_xyz" }, "trace_id": "abc-123-def", "timestamp": "2025-11-02T08:21:45Z" } } ``` ## Related Resources - [Get Department Tree](/docs/api-reference/departments/tree) - [List Departments](/docs/api-reference/departments/list) - [Retrieve Department](/docs/api-reference/departments/retrieve) - [Create Department](/docs/api-reference/departments/create) - [Update Department](/docs/api-reference/departments/update) - [Reparent Department](/docs/api-reference/departments/reparent) - [Delete Department](/docs/api-reference/departments/delete) - [Add Department Member](/docs/api-reference/departments/add-member) - [Remove Department Member](/docs/api-reference/departments/remove-member) - [Department Object](/docs/api-reference/objects/department-object)