# Returns the absences that match the given filters.

`POST /people/absences/search`

Group: People Management › Absences · Operation ID: `searchAbsences`

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

## 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`. |

## Request body

Required, `application/json`: searchAbsencesInput.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `filters` | object | yes | The filters to apply. An absence must match every filter you send. Omit to return all absences. |
| `filters.employeeId` | string | no | Limits results to absences for this employee. |
| `filters.absenceTypeId` | string | no | Limits results to absences of this absence type. |
| `filters.status` | string, one of `"requested"`, `"approved"`, `"rejected"`, `"canceled"` | no | Limits results to absences with this status. |
| `filters.startsAfter` | string (date-time) | no | Limits results to absences whose startDate is on or after this value, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. |
| `filters.endsBefore` | string (date-time) | no | Limits results to absences whose endDate is on or before this value, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. |
| `filters.descriptionContains` | string | no | Limits results to absences whose description contains this text. The match is case-insensitive. |
| `page` | object | no | Pagination controls. Omit for the first page. |
| `page.cursor` | string | no | The cursor from the previous response's pagination.nextCursor. Omit on the first request. |
| `page.size` | number | no | The number of absences per page, at most 100. Defaults to 25. A value above 100 is treated as 100, not rejected. |

Example:

```json
{
  "filters": {
    "employeeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "absenceTypeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "status": "requested",
    "startsAfter": "2026-01-15T09:30:00.000Z",
    "endsBefore": "2026-01-15T09:30:00.000Z",
    "descriptionContains": "<descriptionContains>"
  },
  "page": {
    "cursor": "<cursor>",
    "size": 0
  }
}
```

## Response

`200` Success

Under `data` (searchAbsencesOutput):

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `items` | array of object | yes | The absences on this page. An empty array when nothing matches. |
| `items[].id` | string | yes | The unique identifier for the absence. |
| `items[].leaveNumber` | string | no | The absence number. |
| `items[].employeeId` | string | yes | The unique identifier for the employee the absence belongs to. See id on GET people/:id. |
| `items[].absenceTypeId` | string | yes | The unique identifier for the absence type. See id on GET people/absence-types/:id. |
| `items[].startDate` | string (date-time) | yes | The date and time the absence starts, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. |
| `items[].endDate` | string (date-time) | yes | The date and time the absence ends, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. |
| `items[].days` | string (decimal) | no | The number of absence days. May be fractional for partial days. |
| `items[].status` | string, one of `"requested"`, `"approved"`, `"rejected"`, `"canceled"` | no | The status of the absence. |
| `items[].leaveDescription` | string | no | The free-text reason for the absence. |
| `pagination` | object | yes | The pagination details for this page. |
| `pagination.nextCursor` | string | no | The cursor for the next page. Pass it as page.cursor. Absent on the last page. |
| `pagination.hasMore` | boolean | yes | Whether more absences remain after this page. |

## 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
