GETTING STARTED
Kore.ai XO Platform
Virtual Assistants Overview
Natural Language Processing (NLP)
Concepts and Terminology
Quick Start Guide
Accessing the Platform
Navigating the Kore.ai XO Platform
Building a Virtual Assistant
Help & Learning Resources
Release Notes
Current Version
Recent Updates
Previous Versions
Deprecations
Request a Feature
CONCEPTS
Design
Storyboard
Overview
FAQs
Conversation Designer
Overview
Dialog Tasks
Mock Scenes
Dialog Tasks
Overview
Navigate Dialog Tasks
Build Dialog Tasks
Node Types
Overview
Intent Node
Dialog Node
Dynamic Intent Node
GenAI Node
GenAI Node (v2, BETA)
GenAI Prompt
Entity Node
Form Node
Confirmation Node
Message Nodes
Logic Node
Bot Action Node
Service Node
Webhook Node
Script Node
Process Node
Agent Transfer
Node Connections
Node Connections Setup
Sub-Intent Scoping
Entity Types
Entity Rules
User Prompts or Messages
Voice Call Properties
Knowledge AI
Introduction
Knowledge Graph
Introduction
Terminology
Build a Knowledge Graph
Manage FAQs
Knowledge Extraction
Import or Export Knowledge Graph
Prepare Data for Import
Importing Knowledge Graph
Exporting Knowledge Graph
Auto-Generate Knowledge Graph
Knowledge Graph Analysis
Answer from Documents
Alert Tasks
Small Talk
Digital Skills
Overview
Digital Forms
Digital Views
Introduction
Widgets
Panels
Session and Context Variables
Context Object
Intent Discovery
Train
NLP Optimization
ML Engine
Overview
Model Validation
FM Engine
KG Engine
Traits Engine
Ranking and Resolver
Training Validations
NLP Configurations
NLP Guidelines
LLM and Generative AI
Introduction
LLM Integration
Kore.ai XO GPT Module
Prompts & Requests Library
Co-Pilot Features
Dynamic Conversations Features
Guardrails
Intelligence
Introduction
Event Handlers
Contextual Memory
Contextual Intents
Interruption Management
Multi-intent Detection
Amending Entities
Default Conversations
Conversation Driven Dialog Builder
Sentiment Management
Tone Analysis
Default Standard Responses
Ignore Words & Field Memory
Test & Debug
Overview
Talk to Bot
Utterance Testing
Batch Testing
Conversation Testing
Conversation Testing Overview
Create a Test Suite
Test Editor
Test Case Assertion
Test Case Execution Summary
Glossary
Health and Monitoring
NLP Health
Flow Health
Integrations
Actions
Actions Overview
Asana
Configure
Templates
Azure OpenAI
Configure
Templates
BambooHR
Configure
Templates
Bitly
Configure
Templates
Confluence
Configure
Templates
DHL
Configure
Templates
Freshdesk
Configure
Templates
Freshservice
Configure
Templates
Google Maps
Configure
Templates
Here
Configure
Templates
HubSpot
Configure
Templates
JIRA
Configure
Templates
Microsoft Graph
Configure
Templates
Open AI
Configure
Templates
Salesforce
Configure
Templates
ServiceNow
Configure
Templates
Stripe
Configure
Templates
Shopify
Configure
Templates
Twilio
Configure
Templates
Zendesk
Configure
Templates
Agents
Agent Transfer Overview
Custom (BotKit)
Drift
Genesys
Intercom
NiceInContact
NiceInContact(User Hub)
Salesforce
ServiceNow
Configure Tokyo and Lower versions
Configure Utah and Higher versions
Unblu
External NLU Adapters
Overview
Dialogflow Engine
Test and Debug
Deploy
Channels
Publishing
Versioning
Analyze
Introduction
Dashboard Filters
Overview Dashboard
Conversations Dashboard
Users Dashboard
Performance Dashboard
Custom Dashboards
Introduction
Custom Meta Tags
Create Custom Dashboard
Create Custom Dashboard Filters
LLM and Generative AI Logs
NLP Insights
Task Execution Logs
Conversations History
Conversation Flows
Conversation Insights
Feedback Analytics
Usage Metrics
Containment Metrics
Universal Bots
Introduction
Universal Bot Definition
Universal Bot Creation
Training a Universal Bot
Universal Bot Customizations
Enabling Languages
Store
Manage Assistant
Team Collaboration
Plan & Usage
Overview
Usage Plans
Templates
Support Plans
Invoices
Authorization
Conversation Sessions
Multilingual Virtual Assistants
Get Started
Supported Components & Features
Manage Languages
Manage Translation Services
Multiingual Virtual Assistant Behavior
Feedback Survey
Masking PII Details
Variables
Collections
IVR Settings
General Settings
Assistant Management
Manage Namespace
Data
Overview
Guidelines
Data Table
Table Views
App Definitions
Data as Service
HOW TOs
Build a Travel Planning Assistant
Travel Assistant Overview
Create a Travel Virtual Assistant
Design Conversation Skills
Create an ‘Update Booking’ Task
Create a Change Flight Task
Build a Knowledge Graph
Schedule a Smart Alert
Design Digital Skills
Configure Digital Forms
Configure Digital Views
Train the Assistant
Use Traits
Use Patterns
Manage Context Switching
Deploy the Assistant
Use Bot Functions
Use Content Variables
Use Global Variables
Use Web SDK
Build a Banking Assistant
Design Conversation Skills
Create a Sample Banking Assistant
Create a Transfer Funds Task
Create a Update Balance Task
Create a Knowledge Graph
Set Up a Smart Alert
Design Digital Skills
Configure Digital Forms
Configure Digital Views
Add Data to Data Tables
Update Data in Data Tables
Add Data from Digital Forms
Train the Assistant
Composite Entities
Use Traits
Use Patterns for Intents & Entities
Manage Context Switching
Deploy the Assistant
Configure an Agent Transfer
Use Assistant Functions
Use Content Variables
Use Global Variables
Intent Scoping using Group Node
Analyze the Assistant
Create a Custom Dashboard
Use Custom Meta Tags in Filters
APIs & SDKs
API Reference
API Introduction
Rate Limits
API List
koreUtil Libraries
SDK Reference
SDK Introduction
Web SDK
How the Web SDK Works
SDK Security
SDK Registration
Web Socket Connect and RTM
Tutorials
Widget SDK Tutorial
Web SDK Tutorial
BotKit SDK
BotKit SDK Deployment Guide
Installing the BotKit SDK
Using the BotKit SDK
SDK Events
SDK Functions
Installing Botkit in AWS
Tutorials
BotKit - Blue Prism
BotKit - Flight Search Sample VA
BotKit - Agent Transfer

ADMINISTRATION
Intro to Bots Admin Console
Administration Dashboard
User Management
Managing Your Users
Managing Your Groups
Role Management
Manage Data Tables and Views
Bot Management
Enrollment
Inviting Users
Sending Bulk Invites to Enroll Users
Importing Users and User Data
Synchronizing Users from Active Directory
Security & Compliance
Using Single Sign-On
Two-Factor Authentication for Platform Access
Security Settings
Cloud Connector
Analytics for Bots Admin
Billing
  1. Home
  2. Docs
  3. Virtual Assistants
  4. API Guide
  5. Sessions History API

Sessions History API

This API retrieves the conversation sessions created. It returns information such as session metadata, user and bot identifiers, session duration, language, status, and other relevant metrics.

Method POST
Endpoint https://{{host}}/api/public/bot/{{BotID}}/getSessions?containmentType={{containmentType}}
and https://{{host}}/api/public/getSessions?containmentType={{containmentType}}for BAC
Content Type application/json
Authorization

auth: {{JWT}}

See How to generate the JWT Token.

API Scope
  • Bot Builder: Bot Sessions
  • OR

  • Admin Console: Bot Analytics > Bot Sessions

Path Parameters

Parameter Description
host Environment URL, for example, https://bots.kore.ai
BotID Bot ID or Stream ID. You can access it from the General Settings page of the bot.
containmentType
(introduced in ver9.0)

Use to filter the results based on the type of the session i.e Self-service vs. Drop-off vs. Agent Transfer
Valid values:

  • dropOff,
  • selfService,
  • 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' \
         --data-raw ''
  • 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": ["6465cf6e4769ed4e822b82a1","6465cf6e47Q9ed4e822b82a1"]
     }'

Request Body Parameters

Parameter Description Required/Optional
userId The ID of the user whose conversation history to access. Can be a user email id or enterprise assigned unique id. Optional
skip/offset The number of messages to be skipped. Optional
limit The number of messages to be shown on each page.
The latest sessions are returned first; the sessions are returned in descending order of start time.
Optional
dateFrom Takes the date format yyyy-mm-dd
(or) yyyy-mm-ddThh:mm:ss.msZ
eg:2019-04-01 (or) 2019-04-01T13:25:58.515Z. If not provided, calculated as 7 days behind dataTo.
Optional
dateTo Takes the date format yyyy-mm-dd
(or) yyyy-mm-ddThh:mm:ss.msZ
eg:2019-04-01 (or) 2019-04-01 T13:26:05.598Z. If not provided, calculated as 7 days from dateFrom. If dateFrom is also not provided then set to Today.

  • The dateTo or dateFrom parameter accepts the YYYY-MM-DD date format. The time format is considered as a GMT zone in the API endpoint via Sessions API.
  • When retrieving the data from the bot builder > dashboard, the local time zone (IST) is used; the time is converted from GMT to IST format, and then the data is retrieved.
Optional
tags Meta tags to filter the conversations. Optional
sessionType
(introduced in v8.0)

Type to filter the conversations – can be:

  • non-interactive – sessions that have bot messages presented without any message from the user
  • interactive – sessions that include one or more messages from the user
Optional
sessionId
(introduced in v10.1.3)

An array of session IDs to filter the conversations. It can have a maximum of 50 session IDs. (Duplicate session IDs are ignored, but they are counted.)

Note: If you use ‘sessionId’ in the Body, other parameters/filters are ignored.

Optional

Note: The duration between dateTo and dateFrom should be less than 7 days, else an error will be thrown.

Sample Response

  • For dropOff sessions
    {
      "total": 1,
      "moreAvailable": false,
      "sessions": [
       {
         "sessionId": "xxxxaxxexxxaxexdxxxdxxxe",
         "botId": "st-ffeffxxx-xxxc-xexa-axxx-cxxabxxxxcxx",
         "channel": "rtm",
         "userId": "u-xxfexxxd-xxex-xdxe-xaec-xeaxbxxxxfxx",
         "start_time": "2021-04-26T11:27:25.977Z",
         "end_time": "2021-04-26T11:27:26.145Z",
         "session_lang": [
           "en"
          ],
         "sessionType": "interactive",
         "containmentType": "dropOff",
         "isDeveloper": false,
         "tags": {
           "userTags": [
            {
             "value": "newuser",
             "name": "regular"
            }
          ],
          "sessionTags": []
         },
         "noOfMessagesExchanged": 1,
         "noOfTasksExecuted": 0
       }
      ]
    }
  • For selfService sessions
    {
      "total": 2,
      "moreAvailable": false,
      "sessions": [
       {
         "sessionId": "xxxxaxxexxxaxexdxxxdxxxe",
         "botId": "st-ffeffxxx-xxxc-xexa-axxx-cxxabxxxxcxx",
         "channel": "rtm",
         "userId": "u-xxfexxxd-xxex-xdxe-xaec-xeaxbxxxxfxx",
         "start_time": "2021-04-26T11:27:25.977Z",
         "end_time": "2021-04-26T11:27:26.145Z",
         "session_lang": [
           "en"
          ],
         "sessionType": "non-interactive",
         "containmentType": "selfService",
         "isDeveloper": false,
         "tags": {
           "userTags": [
            {
             "value": "newuser",
             "name": "regular"
            }
           ],
           "sessionTags": []
         },
         "noOfMessagesExchanged": 6,
         "noOfTasksExecuted": 0
        },
       {
         "sessionId": "xxxxaxxexxxaxexdxxxdxxxe",
         "botId": "st-ffeffxxx-xxxc-xexa-axxx-cxxabxxxxcxx",
         "channel": "rtm",
         "userId": "u-xxfexxxd-xxex-xdxe-xaec-xeaxbxxxxfxx",
         "start_time": "2021-04-26T11:27:25.977Z",
         "end_time": "2021-04-26T11:27:26.145Z",
         "session_lang": [
           "en"
          ],
          "sessionType": "non-interactive",
          "containmentType": "selfService",
          "isDeveloper": false,
         "tags": {
           "userTags": [
             {
              "value": "newuser",
              "name": "regular"
            }
          ],
         "sessionTags": []
         },
         "noOfMessagesExchanged": 8,
         "noOfTasksExecuted": 0
        }
      ]
    }
  • For agent sessions
    {
      "total": 1,
      "moreAvailable": false,
      "sessions": [
       {
         "sessionId": "xxxxaxxexxxaxexdxxxdxxxe",
         "botId": "st-ffeffxxx-xxxc-xexa-axxx-cxxabxxxxcxx",
         "channel": "rtm",
         "userId": "u-xxfexxxd-xxex-xdxe-xaec-xeaxbxxxxfxx",
         "start_time": "2021-04-26T11:27:25.977Z",
         "end_time": "2021-04-26T11:27:26.145Z",
         "session_lang": [
           "en"
          ],
    	 "sessionType": "interactive",
             "containmentType": "agent", 
    	 "isDeveloper": false,
    	 "tags": {
    		"userTags": [],
    		"sessionTags": []
    	 },
    	 "noOfMessagesExchanged": 7,
    	 "noOfTasksExecuted": 2
    	}
      ]
    }
  • For one or more session Ids
    {
        "total": 1,
        "moreAvailable": false,
        "sessions": [
            {
                "sessionId": "6465cf6e4769ed4e822b82a1",
                "botId": "st-dc600cf5-b1c5-581e-a2c3-eb81fe39c927",
                "channel": "rtm",
                "userId": "u-8c4ca335-3152-5622-9cbb-51c6daf6c12f",
                "start_time": "2023-05-18T07:10:38.695Z",
                "end_time": "2023-05-18T07:10:39.201Z",
                "session_lang": [
                    "en"
                ],
                "sessionType": "interactive",
                "isDeveloper": false,
                "sessionStatus": "closed",
                "tags": {
                    "userTags": [],
                    "sessionTags": []
                },
                "noOfMessagesExchanged": 3,
                "noOfTasksExecuted": 1,
                "containmentType": "selfService"
            }
        ],
        "invalidSessions": [
            "6465cf6e47Q9ed4e822b82a1"
        ]
    }

Response Body Parameters

Parameter Description
total

The total number of records identified as per the API request parameters. The response will include a maximum of X records. If more than X records are identified, then the ‘moreAvailable’ field in the response will have the value as ‘True’.

It is recommended to programmatically iterate the request by dynamically updating the values of the ‘skip’ and ‘limit’ parameters in the request.

moreAvailable Indicates if the API has returned all the records or if more are available, based on the pagination criteria.
True if more records are available. False if there are no more records to be retrieved.
sessions Contains complete information about the session.
sessions.sessionId The unique identifier for the session record.
sessions.botId Bot ID or Stream ID.
sessions.channel The channel in which the end user is having the conversation: sms, email, rtm, slack, skype, twitter, msteams, api, kore, facebook, or skypeforbusiness.
sessions.userId The user Id of the end user who is having a conversation with the bot.
sessions.start_time The start time of the session. (ISO Date format YYYY-MM-DDThh:mm:ss.mmmZ)
sessions.end_time The end time of the session. (ISO Date format YYYY-MM-DDThh:mm:ss.mmmZ)
sessions.session_lang All the languages in which the conversation happened during the session.
sessions.sessionType

The type to filter the conversations:

  • non-interactive – sessions having only bot messages, no message from the user.
  • interactive – sessions having one or more messages from the user.
sessions.containmentType Used to filter the results based on the type of the session: selfservice, dropOff, or agent.
sessions.isDeveloper Informs whether the session was initiated by a developer; 1 for Yes, 0 for No.
sessions.sessionStatus The status of the session – active or closed.
sessions.tags Meta tags to filter the sessions.
sessions.tags.userTags User tags object; custom tags added to the user’s profile information.
sessions.tags.userTags.value Tag’s value.
sessions.tags.userTags.name Tag’s name.
sessions.tags.sessionTags Session tags object; custom tags added to the conversation session.
sessions.tags.sessionTags.value Tag’s value.
sessions.tags.sessionTags.name Tag’s name.
sessions.noOfMessagesExchanged The number of messages exchanged in the session.
sessions.noOfTasksExecuted The number of tasks executed in the session.
invalidSessions An array listing session IDs that were not found.

Sessions History API

This API retrieves the conversation sessions created. It returns information such as session metadata, user and bot identifiers, session duration, language, status, and other relevant metrics.

Method POST
Endpoint https://{{host}}/api/public/bot/{{BotID}}/getSessions?containmentType={{containmentType}}
and https://{{host}}/api/public/getSessions?containmentType={{containmentType}}for BAC
Content Type application/json
Authorization

auth: {{JWT}}

See How to generate the JWT Token.

API Scope
  • Bot Builder: Bot Sessions
  • OR

  • Admin Console: Bot Analytics > Bot Sessions

Path Parameters

Parameter Description
host Environment URL, for example, https://bots.kore.ai
BotID Bot ID or Stream ID. You can access it from the General Settings page of the bot.
containmentType
(introduced in ver9.0)

Use to filter the results based on the type of the session i.e Self-service vs. Drop-off vs. Agent Transfer
Valid values:

  • dropOff,
  • selfService,
  • 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' \
         --data-raw ''
  • 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": ["6465cf6e4769ed4e822b82a1","6465cf6e47Q9ed4e822b82a1"]
     }'

Request Body Parameters

Parameter Description Required/Optional
userId The ID of the user whose conversation history to access. Can be a user email id or enterprise assigned unique id. Optional
skip/offset The number of messages to be skipped. Optional
limit The number of messages to be shown on each page.
The latest sessions are returned first; the sessions are returned in descending order of start time.
Optional
dateFrom Takes the date format yyyy-mm-dd
(or) yyyy-mm-ddThh:mm:ss.msZ
eg:2019-04-01 (or) 2019-04-01T13:25:58.515Z. If not provided, calculated as 7 days behind dataTo.
Optional
dateTo Takes the date format yyyy-mm-dd
(or) yyyy-mm-ddThh:mm:ss.msZ
eg:2019-04-01 (or) 2019-04-01 T13:26:05.598Z. If not provided, calculated as 7 days from dateFrom. If dateFrom is also not provided then set to Today.

  • The dateTo or dateFrom parameter accepts the YYYY-MM-DD date format. The time format is considered as a GMT zone in the API endpoint via Sessions API.
  • When retrieving the data from the bot builder > dashboard, the local time zone (IST) is used; the time is converted from GMT to IST format, and then the data is retrieved.
Optional
tags Meta tags to filter the conversations. Optional
sessionType
(introduced in v8.0)

Type to filter the conversations – can be:

  • non-interactive – sessions that have bot messages presented without any message from the user
  • interactive – sessions that include one or more messages from the user
Optional
sessionId
(introduced in v10.1.3)

An array of session IDs to filter the conversations. It can have a maximum of 50 session IDs. (Duplicate session IDs are ignored, but they are counted.)

Note: If you use ‘sessionId’ in the Body, other parameters/filters are ignored.

Optional

Note: The duration between dateTo and dateFrom should be less than 7 days, else an error will be thrown.

Sample Response

  • For dropOff sessions
    {
      "total": 1,
      "moreAvailable": false,
      "sessions": [
       {
         "sessionId": "xxxxaxxexxxaxexdxxxdxxxe",
         "botId": "st-ffeffxxx-xxxc-xexa-axxx-cxxabxxxxcxx",
         "channel": "rtm",
         "userId": "u-xxfexxxd-xxex-xdxe-xaec-xeaxbxxxxfxx",
         "start_time": "2021-04-26T11:27:25.977Z",
         "end_time": "2021-04-26T11:27:26.145Z",
         "session_lang": [
           "en"
          ],
         "sessionType": "interactive",
         "containmentType": "dropOff",
         "isDeveloper": false,
         "tags": {
           "userTags": [
            {
             "value": "newuser",
             "name": "regular"
            }
          ],
          "sessionTags": []
         },
         "noOfMessagesExchanged": 1,
         "noOfTasksExecuted": 0
       }
      ]
    }
  • For selfService sessions
    {
      "total": 2,
      "moreAvailable": false,
      "sessions": [
       {
         "sessionId": "xxxxaxxexxxaxexdxxxdxxxe",
         "botId": "st-ffeffxxx-xxxc-xexa-axxx-cxxabxxxxcxx",
         "channel": "rtm",
         "userId": "u-xxfexxxd-xxex-xdxe-xaec-xeaxbxxxxfxx",
         "start_time": "2021-04-26T11:27:25.977Z",
         "end_time": "2021-04-26T11:27:26.145Z",
         "session_lang": [
           "en"
          ],
         "sessionType": "non-interactive",
         "containmentType": "selfService",
         "isDeveloper": false,
         "tags": {
           "userTags": [
            {
             "value": "newuser",
             "name": "regular"
            }
           ],
           "sessionTags": []
         },
         "noOfMessagesExchanged": 6,
         "noOfTasksExecuted": 0
        },
       {
         "sessionId": "xxxxaxxexxxaxexdxxxdxxxe",
         "botId": "st-ffeffxxx-xxxc-xexa-axxx-cxxabxxxxcxx",
         "channel": "rtm",
         "userId": "u-xxfexxxd-xxex-xdxe-xaec-xeaxbxxxxfxx",
         "start_time": "2021-04-26T11:27:25.977Z",
         "end_time": "2021-04-26T11:27:26.145Z",
         "session_lang": [
           "en"
          ],
          "sessionType": "non-interactive",
          "containmentType": "selfService",
          "isDeveloper": false,
         "tags": {
           "userTags": [
             {
              "value": "newuser",
              "name": "regular"
            }
          ],
         "sessionTags": []
         },
         "noOfMessagesExchanged": 8,
         "noOfTasksExecuted": 0
        }
      ]
    }
  • For agent sessions
    {
      "total": 1,
      "moreAvailable": false,
      "sessions": [
       {
         "sessionId": "xxxxaxxexxxaxexdxxxdxxxe",
         "botId": "st-ffeffxxx-xxxc-xexa-axxx-cxxabxxxxcxx",
         "channel": "rtm",
         "userId": "u-xxfexxxd-xxex-xdxe-xaec-xeaxbxxxxfxx",
         "start_time": "2021-04-26T11:27:25.977Z",
         "end_time": "2021-04-26T11:27:26.145Z",
         "session_lang": [
           "en"
          ],
    	 "sessionType": "interactive",
             "containmentType": "agent", 
    	 "isDeveloper": false,
    	 "tags": {
    		"userTags": [],
    		"sessionTags": []
    	 },
    	 "noOfMessagesExchanged": 7,
    	 "noOfTasksExecuted": 2
    	}
      ]
    }
  • For one or more session Ids
    {
        "total": 1,
        "moreAvailable": false,
        "sessions": [
            {
                "sessionId": "6465cf6e4769ed4e822b82a1",
                "botId": "st-dc600cf5-b1c5-581e-a2c3-eb81fe39c927",
                "channel": "rtm",
                "userId": "u-8c4ca335-3152-5622-9cbb-51c6daf6c12f",
                "start_time": "2023-05-18T07:10:38.695Z",
                "end_time": "2023-05-18T07:10:39.201Z",
                "session_lang": [
                    "en"
                ],
                "sessionType": "interactive",
                "isDeveloper": false,
                "sessionStatus": "closed",
                "tags": {
                    "userTags": [],
                    "sessionTags": []
                },
                "noOfMessagesExchanged": 3,
                "noOfTasksExecuted": 1,
                "containmentType": "selfService"
            }
        ],
        "invalidSessions": [
            "6465cf6e47Q9ed4e822b82a1"
        ]
    }

Response Body Parameters

Parameter Description
total

The total number of records identified as per the API request parameters. The response will include a maximum of X records. If more than X records are identified, then the ‘moreAvailable’ field in the response will have the value as ‘True’.

It is recommended to programmatically iterate the request by dynamically updating the values of the ‘skip’ and ‘limit’ parameters in the request.

moreAvailable Indicates if the API has returned all the records or if more are available, based on the pagination criteria.
True if more records are available. False if there are no more records to be retrieved.
sessions Contains complete information about the session.
sessions.sessionId The unique identifier for the session record.
sessions.botId Bot ID or Stream ID.
sessions.channel The channel in which the end user is having the conversation: sms, email, rtm, slack, skype, twitter, msteams, api, kore, facebook, or skypeforbusiness.
sessions.userId The user Id of the end user who is having a conversation with the bot.
sessions.start_time The start time of the session. (ISO Date format YYYY-MM-DDThh:mm:ss.mmmZ)
sessions.end_time The end time of the session. (ISO Date format YYYY-MM-DDThh:mm:ss.mmmZ)
sessions.session_lang All the languages in which the conversation happened during the session.
sessions.sessionType

The type to filter the conversations:

  • non-interactive – sessions having only bot messages, no message from the user.
  • interactive – sessions having one or more messages from the user.
sessions.containmentType Used to filter the results based on the type of the session: selfservice, dropOff, or agent.
sessions.isDeveloper Informs whether the session was initiated by a developer; 1 for Yes, 0 for No.
sessions.sessionStatus The status of the session – active or closed.
sessions.tags Meta tags to filter the sessions.
sessions.tags.userTags User tags object; custom tags added to the user’s profile information.
sessions.tags.userTags.value Tag’s value.
sessions.tags.userTags.name Tag’s name.
sessions.tags.sessionTags Session tags object; custom tags added to the conversation session.
sessions.tags.sessionTags.value Tag’s value.
sessions.tags.sessionTags.name Tag’s name.
sessions.noOfMessagesExchanged The number of messages exchanged in the session.
sessions.noOfTasksExecuted The number of tasks executed in the session.
invalidSessions An array listing session IDs that were not found.
Menu