---
title: GET /harness/sessions
description: List sessions
full: true
---

**Auth:** required. Send an `ivy_` API key (`Authorization: Bearer ivy_…` or `X-Ivy-Api-Key`), a Clerk session JWT (`Authorization: Bearer …`) or the Clerk `__session` cookie (browser sessions). See [Authentication](/docs/api/authentication).

Returns your sessions, most recently active first. Page with `limit` and `cursor`: when `hasMore` is true, pass the returned `nextCursor` to get the next page.

## Request

#### Query parameters

- `limit` (integer) —

- `cursor` (string (date-time)) —
Pagination cursor — pass the `nextCursor` from the previous page (ISO date-time of last item's `lastActiveAt`)

- `organizationId` (string) —

## Responses

### `200` OK

Session list

Response shape:

- `sessions` (object[]) —

- `hasMore` (boolean) —

- `nextCursor` (string (date-time)) —
Pass as `cursor` in the next request to fetch the following page

### `401` Unauthorized

Authentication required

Response shape: `object`

**curl**

```bash
curl -X GET 'https://ivybiosciences.com/api/harness/sessions' \
  -H "Authorization: Bearer $IVY_API_KEY"
```

**JavaScript**

```js
const res = await fetch('https://ivybiosciences.com/api/harness/sessions', {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${process.env.IVY_API_KEY}`,
  },
});
const data = await res.json();
```

**Python**

```python
import os, requests

res = requests.get(
    "https://ivybiosciences.com/api/harness/sessions",
    headers={"Authorization": f"Bearer {os.environ['IVY_API_KEY']}"},
)
data = res.json()
```
