Skip to main content

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.

Back to API List Retrieves conversation sessions. Returns session metadata, user and bot identifiers, session duration, language, status, and other relevant metrics.
FieldValue
MethodPOST
Endpointhttps://{{host}}/api/public/bot/{{BotID}}/getSessions?containmentType={{containmentType}} (or https://{{host}}/api/public/getSessions?containmentType={{containmentType}} for BAC)
Content Typeapplication/json
Authorizationauth: {{JWT}} See How to generate the JWT Token.
API ScopeApp Builder: Bot Sessions; Admin Console: Bot Analytics > Bot Sessions

Path Parameters

ParameterDescription
hostEnvironment URL, for example, https://platform.kore.ai.
BotIDBot ID or Stream ID. Access it from the General Settings page of the bot.
containmentTypeFilter results by session type: dropOff, selfService, or agent.

Sample Request

Without a body:
curl --location --request POST 'https://{{host}}/api/public/getSessions?containmentType={{containmentType}}' \
     --header 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \
     --header 'Content-Type: application/json'
With a body:
curl --location --request POST 'https://{{host}}/api/public/getSessions?containmentType={{containmentType}}' \
     --header 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \
     --header 'Content-Type: application/json' \
     --data-raw '{
        "skip": 0,
        "limit": 100,
        "dateFrom": "2020-02-11",
        "dateTo": "2020-02-12"
     }'
For a specific bot:
curl --location --request POST 'https://{{host}}/api/public/bot/{{BotId}}/getSessions?containmentType={{containmentType}}' \
     --header 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \
     --header 'Content-Type: application/json' \
     --data-raw '{
        "skip": 0,
        "limit": 100,
        "dateFrom": "2020-02-11",
        "dateTo": "2020-02-12"
     }'
For specific session IDs:
curl --location --request POST 'https://{{host}}/api/public/bot/{{BotId}}/getSessions' \
     --header 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \
     --header 'Content-Type: application/json' \
     --data-raw '{
        "sessionId": ["6465cf6e4769ed4e822bxxxx","6465cf6e47Q9ed4e822bxxxx"]
     }'
For specific external call IDs:
curl --location POST 'https://{{host}}/api/public/bot/{{BotId}}/getSessions?callId={{callId}}' \
--header 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \
--header 'Content-Type: application/json' \
--data '{
    "skip": 0,
    "limit": 100,
    "dateFrom": "2025-03-17",
    "dateTo": "2025-03-19"
}'

Request Body Parameters

ParameterRequiredTypeDescription
userIdOptionalStringThe user ID (email or enterprise-assigned unique ID).
skip/offsetOptionalNumberNumber of messages to skip.
limitOptionalNumberNumber of messages per page. Sessions are returned in descending order of start time.
dateFromOptionalDateStart date in yyyy-mm-dd or yyyy-mm-ddThh:mm:ss.msZ format. Defaults to 7 days before dateTo.
dateToOptionalDateEnd date in yyyy-mm-dd or yyyy-mm-ddThh:mm:ss.msZ format. Defaults to today if neither date is provided.
tagsOptionalObjectMeta tags to filter conversations.
sessionTypeOptionalStringFilter by session type: non-interactive (bot messages without user input) or interactive (sessions with user messages).
sessionIdOptionalArray of up to 50 session IDs. If used, all other filters are ignored.