# Teams

`GET /people/teams`

Group: People Management › Teams · Operation ID: `teams`

Returns a list of teams. To list one team's direct children, filter by parentId.

[Open in the interactive reference](https://docs.api.lensing.ai/?op=teams)

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `Api-Version` | header | `"v1"` | yes | The API version this request targets, named by its public identifier. Required on every request; omitting it, or naming a version this company does not have, is answered with 400. This document describes version `v1`. |

## Query surface

- `id` — filter by eq, ne, gt, gte, lt, lte, in, notIn, between, like
- `name` — filter by eq, ne, gt, gte, lt, lte, in, notIn, between, like
- `teamType` — filter by eq, ne, gt, gte, lt, lte, in, notIn, between, like
- `status` — filter by eq, ne, gt, gte, lt, lte, in, notIn, between, like
- `startDate` — filter by eq, ne, gt, gte, lt, lte, in, notIn, between, like
- `endDate` — filter by eq, ne, gt, gte, lt, lte, in, notIn, between, like
- `employeeCount` — filter by eq, ne, gt, gte, lt, lte, in, notIn, between, like
- `parentId` — filter by eq, ne, gt, gte, lt, lte, in, notIn, between, like
- `lastModifiedDate` — filter by eq, ne, gt, gte, lt, lte, in, notIn, between, like
- Orderable: id, teamNumber, name, teamType, status, startDate, endDate, employeeCount, lastModifiedDate
- Selectable: id, teamNumber, name, teamType, status, startDate, endDate, employeeCount, parentId, parentName, lastModifiedDate

## Response

`200` Success

Under `data`, an array of teamsRow:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | no | The unique identifier for the team. |
| `teamNumber` | string or null | no | The system-generated team number. Absent while none has been assigned. |
| `name` | string | no | The name of the team. |
| `teamType` | string or null | no | The type of the team. Possible values: 'hrTeam', 'psaTeam'. |
| `status` | string or null | no | The status of the team, derived from its dates. 'planned' before the start date, 'active' between the dates, 'inactive' after the end date. |
| `startDate` | string (date) or null | no | The first day the team exists. Format YYYY-MM-DD. |
| `endDate` | string (date) or null | no | The last day the team exists. Format YYYY-MM-DD. Absent for a team with no planned end. |
| `employeeCount` | number or null | no | The number of active members of the team. |
| `parentId` | string or null | no | The identifier of the parent team. Absent for a top-level team. See id on GET people/teams/:id. |
| `parentName` | string or null | no | The name of the parent team. Absent for a top-level team. |
| `lastModifiedDate` | string (date-time) | no | The date and time the team record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. |

## Statuses

- `400` — Invalid request or business failure
- `401` — Missing or invalid access token
- `403` — Not authorized
- `404` — Not found
- `429` — Too many requests
- `500` — Internal server error
