> ## 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 Details and Summary API

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

To fetch conversation details and summary between the bot and user, or the user and agent. Supports pagination via `skip` and `limit` parameters.

| Field             | Value                                                                                                                           |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| **Method**        | POST                                                                                                                            |
| **Endpoint**      | `https://{{host}}/api/public/bot/{{botId}}/conversationDetails`                                                                 |
| **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                                                                                                       |

## Path Parameters

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

## Sample Request

```bash theme={null}
curl --location --request POST 'https://platform.kore.ai/api/public/bot/st-86exxx8d-7021-5f2b-bf6c-8a1xxxxxb0/conversationDetails' \
--header 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"callId":"00001",
"isSummaryRequired":true
}'
```

## Request Body Parameters

| Parameter           | Required | Description                                                                                                                                             |
| ------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `skip/offset`       | Optional | The number of messages to skip.                                                                                                                         |
| `limit`             | Optional | The number of messages to show per page.                                                                                                                |
| `sessionId/callId`  | Required | Unique session ID or call ID to fetch conversation details. The `callId` refers to the external call identifier provided by third-party agent desktops. |
| `conversationId`    | Required | Unique identifier for the conversation. Use either `sessionId` or `conversationId`; if both are provided, `sessionId` takes precedence.                 |
| `lang`              | Optional | The language in which the conversation summary should be returned.                                                                                      |
| `isSummaryRequired` | Optional | Whether to include an auto-generated summary: `true` to include, `false` (default) to exclude.                                                          |

<Note>
  If the session ID is available, the call ID is not mandatory and vice versa. If both are present, the session ID is used.
</Note>

## Sample Response

```json theme={null}
{
   "conversationInfo": {
       "userId": "u-c8c61885-85bb-xxxx-xxxx-6fd4a97c58f9",
       "callId": "9eb6c49e-f647-4c48-b31c-cc207e3a6080",
       "sessionStartTime": "2023-08-07T11:18:10.195Z",
       "agentHandOffTime": "2023-08-07T11:18:11.304Z",
       "userDetails": {
           "firstName": "",
           "lastName": "",
           "phoneNumber": null
       },
       "currentTask": "null",
       "sessionId": "64d0d2f2bxxxxxxxxa566d08"
   },
   "conversationFlow": [
       {
           "status": "completedTask",
           "messageStoreId": "xxx",
           "taskName": "ConnectToAgent"
       }
   ],
   "conversationHistory": [
       {
           "type": "outgoing",
           "status": "pending",
           "createdOn": "2023-08-07T11:18:10.337Z",
           "components": [
               {
                   "cT": "text",
                   "data": {
                       "text": "Agent transfer initiated"
                   }
               }
           ]
       }
   ],
   "summary": {
       "ConversationSummary": "agent will need to get an agent on the line to help customer with that.",
       "time": "2023-08-09T06:53:18.579Z"
   }
}
```
