Chatbot Overview
Conversational Bots
Intents & Entities
Intelligent Bots's Approach Conversational Platform
Bot Concepts and Terminology
Natural Language Processing (NLP)
Bot Types
Bot Tasks
Starting with Platform
How to Access Bot Builder
Working with Bot Builder
Building your first Bot
Getting Started with Building Bots
Using the Dialog Builder Tool
Creating a Simple Bot
Release Notes
Latest Updates
Older Releases
Bot Builder
Creating a Bot
Dialog Task
User Intent Node
Dialog Node
Entity Node
Supported Entity Types
Composite Entities
Supported Time Zones
Supported Colors
Supported Company Names
Form Node
Logic Node
Message Nodes
Confirmation Nodes
Service Node
Custom Authentication
2-way SSL for Service nodes
Script Node
Agent Transfer Node
WebHook Node
Grouping Nodes
Connections & Transitions
Managing Dialogs
User Prompts
Alert Tasks
Alert Tasks
Ignore Words and Field Memory
Digital Forms
Digital Views
Knowledge Graph
Importing and Exporting
Knowledge Extraction
Small Talk
Action & Information Task
Action Tasks
Information Tasks
Establishing Flows
Natural Language
Machine Learning
ML Model
Fundamental Meaning
NLP Settings and Guidelines
Knowledge Graph Training
Ranking and Resolver
NLP Detection
Advanced NLP Configurations
Bot Intelligence
Context Management
Session and Context Variables
Context Object
Dialog Management
Amend Entity
Multi-Intent Detection
Sentiment Management
Tone Analysis
Sentiment Management
Default Conversations
Default Standard Responses
Channel Enablement
Test & Debug
Talk to Bot
Utterance Testing
Batch Testing
Record Conversations
Publishing your Bot
Analyzing your Bot
Custom Dashboard
Conversation Flows
Bot Metrics
Advanced Topics
Bot Authorization
Language Management
Collaborative Development
IVR Integration
Data Table
Universal Bots
Enabling Languages
Smart Bots
Sample Bots
Travel Planning
Flight Search
Event Based Bot Actions
koreUtil Libraries
Bot Settings
Bot Functions
General Settings
PII Settings
Customizing Error Messages
Manage Sessions
Bot Management
Bot Versioning
Using Bot Variables
API Guide
API Overview
API List
API Collection
SDK Overview
SDK Security
SDK App Registration
Web SDK Tutorial
Message Formatting and Templates
Mobile SDK Push Notification
Widget SDK Tutorial
Widget SDK – Message Formatting and Templates
Web Socket Connect & RTM
Using the BotKit SDK
BotKit SDK Tutorial – Agent Transfer
BotKit SDK Tutorial – Flight Search Sample Bot
Using an External NLP Engine
Bot Administration
Bots Admin Console
User Management
Managing Users
Managing Groups
Managing Role
Bots Management
Inviting Users
Bulk Invites
Importing Users
Synchronizing Users from AD
Security & Compliance
Using Single Sign-On
Security Settings
Cloud Connector
How Tos
Creating a Simple Bot
Creating a Banking Bot
Transfer Funds Task
Update Balance Task
Context Switching
Using Traits
Schedule a Smart Alert
Configure Digital Forms
Add Form Data into Data Tables
Configuring Digital Views
Add Data to Data Tables
Update Data in Data Tables
Custom Dashboard
Custom Tags to filter Bot Metrics
Patterns for Intents & Entities
Build Knowledge Graph
Global Variables
Content Variables
Using Bot Functions
Configure Agent Transfer
  1. Home
  2. Docs
  3. Bots
  4. API Guide
  5. Sessions History API

Sessions History API

This API retrieves the conversation sessions created. This API is available in BT and BAC app scopes.

To use this API, app needs the Bot Builder API scope of Bot sessions.
OR the Admin API Scope of Bot sessions under Bot Analytics.

POST https://{{host}}/api/public/bot/{{BotID}}/getSessions
and https://{{host}}/api/public/getSessions for Bot Admin Console


Parameter Description
userId (optional) The ID of the user whose conversation history to access. Can be user email id or enterprise assigned unique id.
skip/offset (optional) The number of messages to be skipped.
limit (optional) The number of messages to be shown on each page.
dateFrom (optional) Takes the date format yyyy-mm-dd
(or) yyyy-mm-ddThh:mm:ss.msZ
eg:2019-04-01 (or) 2019-04-01T13:25:58.515ZIf not provided, calculated as 7 days behind dataTo.
dateTo (optional) 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.598ZIf not provided, calculated as 7 days from dateFrom. If dateFrom is also not provided then set to Today.
tags (optional) Meta tags to filter the conversations.
sessionType (optional)
(introduced in ver8.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

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


Invoke the API with JWT in the header with the following syntax:
auth: {{JWT}}

Response content type


Sample Request

  • Without a body
    curl --location --request POST '{{host}}/api/public/getSessions' \
         --header 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \
         --header 'Content-Type: application/json' \
         --data-raw ''
  • With a body
    curl --location --request POST '{{host}}/api/public/getSessions' \
         --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 Bot
    curl --location --request POST '{{host}}/api/public/bot/{{BotId}}/getSessions' \
         --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"

Sample Response

    "total": 2,
    "moreAvailable": false,
    "sessions": [
            "sessionId": "5e43acb58c8ae94f1250e014",
            "botId": "st-c68c3e8f-c88e-541c-bd3b-a624f3e113f7",
            "channel": "rtm",
            "userId": "u-b7a2c3ff-efde-59f0-a95f-ee02d1f4c231",
            "start_time": "2020-02-12T07:43:49.041Z",
            "end_time": "2020-02-12T09:10:49.082Z",
            "session_lang": [
            "tags": {
                "userTags": [],
                "sessionTags": []
            "sessionId": "5e43a73582f2844d4edbacbd",
            "botId": "st-fb172f53-31db-51b2-a5b2-4ef1919daed9",
            "channel": "ivrVoice",
            "userId": "u-c9d0de82-a459-574b-b64c-4ef3b22ec59c",
            "start_time": "2020-02-12T07:20:21.105Z",
            "end_time": "2020-02-12T07:20:22.073Z",
            "session_lang": [
            "tags": {
                "userTags": [],
                "sessionTags": []