> ## Documentation Index
> Fetch the complete documentation index at: https://guide.gpt-trainer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Fetch All Sessions

> Fetch the list of sessions for a chatbot specified by chatbot uuid

### Path

**uuid** `string` *required*

Chatbot uuid

### Query Parameters

**start\_timestamp** `string`

Filter sessions created after this timestamp (inclusive).\
Format: ISO 8601 — `YYYY-MM-DDTHH:mm:ss.sssZ`

**end\_timestamp** `string`

Filter sessions created before this timestamp (inclusive).\
Format: ISO 8601 — `YYYY-MM-DDTHH:mm:ss.sssZ`

#### Timestamp Format

The API uses [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format for timestamps:

* Format: `YYYY-MM-DDTHH:mm:ss.sssZ`
* Example:
  * `start_timestamp=2025-07-16T07:00:00.000Z` means July 16, 2025 at 7:00 AM UTC
  * `end_timestamp=2025-07-24T06:59:59.000Z` means July 24, 2025 at 6:59:59 AM UTC

#### Usage Tips

* Always use UTC timezone (`Z` at the end)
* Include milliseconds (`.000`) even if zero
* Use 24-hour time format
* Don’t forget the `T` separator between date and time
* URL-encode the entire value if passing in a URL manually

### Response

**true** `object[]`

Session list

**Session properties**

**created\_at** `string`

**modified\_at** `string`

**uuid** `string`

**meta** `meta Object`

Session meta properties

**properties**

**user** `user Object`

Exists when lead form was submitted by user

**auth\_data** `auth_data Object`

Exists when user completes "User Identity Verification" and "Save Data
on Success" feature is enabled

```bash Curl theme={null}
curl --location --request GET 'https://app.gpt-trainer.com/api/v1/chatbot/{uuid}/sessions?start_timestamp={start_timestamp}&end_timestamp={end_timestamp}' \
--header 'Authorization: Bearer <token>'
```

```py Python theme={null}
import requests

uuid = '<chatbot-uuid>'
start_timestamp = '<timestamp>'
end_timestamp = '<timestamp>'
url = f'https://app.gpt-trainer.com/api/v1/chatbot/{uuid}/sessions?start_timestamp={start_timestamp}&end_timestamp={end_timestamp}'
headers = {
    'Authorization': 'Bearer <token>'
}

response = requests.get(url, headers=headers)

if response.status_code == 200:
    print("Request successful!")
    print(response.json())
else:
    print("Request failed with status code:", response.status_code)
    print(response.text)
```

```ts JavaScript theme={null}
const axios = require("axios");

const uuid = "<chatbot-uuid>";
const start_timestamp = '<timestamp>'
const end_timestamp = '<timestamp>'
const url = `https://app.gpt-trainer.com/api/v1/chatbot/${uuid}/sessions?start_timestamp=${start_timestamp}&end_timestamp=${end_timestamp}`;
const headers = {
  Authorization: "Bearer <token>",
};

axios
  .get(url, { headers })
  .then((response) => {
    console.log("Request successful!");
    console.log(response.data);
  })
  .catch((error) => {
    console.error("Request failed:", error);
  });
```

```json Response theme={null}
[
  {
    "created_at": "string",
    "modified_at": "string",
    "uuid": "string"
  }
]
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.