> ## Documentation Index
> Fetch the complete documentation index at: https://koreai.mintlify.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Conversation History API - Lightweight

<Badge icon="arrow-left" color="gray">[Back to API List](/ai-for-service/apis/automation/api-list)</Badge>

A lightweight endpoint that returns chat transcripts without additional metadata or payload overhead. Supports high-volume retrieval and minimizes response size to reduce processing time and avoid rate limit issues.

| Field             | Value                                                                                                                                                                                   |
| ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Method**        | GET and POST                                                                                                                                                                            |
| **Endpoint**      | **GET**: `https://{{host}}/api/public/bot/{{botId}}/messages-lite?userId={{userId}}&limit=5&skip=0&offset=0` <br /> **POST**: `https://{{host}}/api/public/bot/{{botId}}/messages-lite` |
| **Content Type**  | `application/json`                                                                                                                                                                      |
| **Authorization** | `auth: {{JWT}}` See [How to generate the JWT Token](/ai-for-service/apis/automation/api-introduction#generating-the-jwt-token).                                                         |
| **API Scope**     | App Builder: Chat History; Admin Console: Bot Analytics > Chat History                                                                                                                  |

## Path Parameters

| Parameter | Required | Description                                                        |
| --------- | -------- | ------------------------------------------------------------------ |
| `host`    | Required | Environment URL, for example, `https://platform.kore.ai`.          |
| `botId`   | Required | Bot ID or Stream ID. Access it on the bot's General Settings page. |

## Sample Request

**GET Method:**

```bash theme={null}
curl --location 'https://{{host}}/api/public/bot/{{botId}}/messages-lite?userId={{userId}}&limit=5&skip=0&offset=0' \
--header 'accept: application/json' \
--header 'auth: {{YOUR_JWT_ACCESS_TOKEN}}'
```

**POST method:**

```bash theme={null}
curl --location 'https://{{host}}/api/public/bot/{{botId}}/messages-lite' \
--header 'accept: application/json' \
--header 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \
--header 'Content-Type: application/json' \
--data '{"userId": "u-xxxx-xxxxx-xxxx", "sessionId": "5eadxxxxxxxxxxxxx", "dateFrom": "2019-04-01", "dateTo": "2019-04-30", "channelType": "rtm", "type": ["incoming", "outgoing"], "limit": 100, "skip": 0, "isDeveloper": false}'
```

## Request Query Parameters (GET)

| Parameter | Required | Type    | Description                                                                                                         |
| --------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------- |
| `userId`  | Required | String  | Unique identifier of the user.                                                                                      |
| `limit`   | Optional | Integer | The maximum number of messages returned per request is 1000, with a default of 5 messages if no limit is specified. |
| `skip`    | Optional | Integer | Number of records to skip before retrieving results.                                                                |
| `offset`  | Optional | Integer | Pagination offset value.                                                                                            |

## Request Body Parameters (POST)

| Parameter     | Required | Type    | Description                                              |
| ------------- | -------- | ------- | -------------------------------------------------------- |
| `userId`      | Required | String  | Unique identifier of the user.                           |
| `sessionId`   | Optional | String  | Unique session identifier.                               |
| `dateFrom`    | Optional | String  | Start date for filtering messages. Format: `YYYY-MM-DD`. |
| `dateTo`      | Optional | String  | End date for filtering messages. Format: `YYYY-MM-DD`.   |
| `channelType` | Optional | String  | Source channel, for example `rtm`.                       |
| `type`        | Optional | Array   | Message direction: `incoming` or `outgoing`.             |
| `limit`       | Optional | Integer | Maximum number of messages to return.                    |
| `skip`        | Optional | Integer | Number of records to skip.                               |
| `isDeveloper` | Optional | Boolean | Indicates if the query runs in developer mode.           |

## Sample Response

**GET method:**

```json theme={null}
{
  "total": 120,
  "moreAvailable": true,
  "messages": [
    {
      "_id": "ms-221b1c28-b924-56be-aac7-2d28d5b5xxxx",
      "botId": "st-cb7818ab-5d92-5b27-95c4-503c1d94xxxx",
      "type": "outgoing",
      "status": "pending",
      "createdOn": "2025-11-11T05:05:46.526Z",
      "sessionId": "6912c08e55667c476791xxxx",
      "lang": "en",
      "chnl": "rtm",
      "components": [
        {
          "cT": "text",
          "data": {
            "text": "I am closing our current conversation as I have not received any input from you."
          }
        }
      ]
    }
  ]
}
```

## Response Body Parameters

| Parameter       | Type    | Description                                                                |
| --------------- | ------- | -------------------------------------------------------------------------- |
| `total`         | Integer | Total number of messages matching the query.                               |
| `moreAvailable` | Boolean | Indicates whether more messages are available beyond the current response. |
| `messages`      | Array   | Array of message objects.                                                  |
| `_id`           | String  | Unique identifier of the message.                                          |
| `botId`         | String  | Unique identifier of the bot.                                              |
| `type`          | String  | Direction: `incoming` or `outgoing`.                                       |
| `status`        | String  | Message status, such as `pending` or `received`.                           |
| `createdOn`     | String  | ISO 8601 timestamp when the message was created.                           |
| `sessionId`     | String  | Unique session ID.                                                         |
| `lang`          | String  | Language of the message.                                                   |
| `chnl`          | String  | Channel through which the message was sent.                                |
| `components`    | Array   | Array of message components.                                               |
| `cT`            | String  | Type of message component, for example `text`.                             |
| `data`          | Object  | Object containing message content.                                         |
