---
title: "Fetch sessions of the OpenAI bot instance"
method: GET
path: "/openai/fetchSessions/:openaiBotId/{instance}"
tags: ["OpenAI Controller"]
---

# Fetch sessions of the OpenAI bot instance

`GET /openai/fetchSessions/:openaiBotId/{instance}`

## Request

- Base URL: `https://evolution-example`
- URL: `https://evolution-example/openai/fetchSessions/:openaiBotId/{instance}`
- Auth: API key in header `apikey`

Fetches the sessions of the specified OpenAI bot instance.

## Path parameters

- `openaiBotId` string, required
- `instance` string, required

## Response `200`

Successfully fetched sessions

- object
  - `message` string

## Other responses

- `400`: Bad Request - Invalid parameters
- `404`: Not Found - No sessions found for the given bot and instance
- `500`: Internal Server Error

## Changes

- **2024-11-25** (v2) `ad43c2b657d9`: 1 info
  - endpoint added
- **2024-11-25** (v2) `c153448703e5`: 1 breaking
  - api path removed without deprecation
- **2024-09-09** (v2) `0c4620ca5ed5`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/evolution-foundation/apis/evolution-api-3/changes/openai/fetchSessions/:openaiBotId/:instance/get.md)

---

[API](https://skmtc.dev/evolution-foundation/apis/evolution-api-3.md) - [All operations](https://skmtc.dev/evolution-foundation/apis/evolution-api-3/llms.txt) - [OpenAPI document](https://skmtc.dev/evolution-foundation/apis/evolution-api-3/revisions/153363ee7f38?raw)
