{"id":21333,"date":"2019-06-04T05:46:49","date_gmt":"2019-06-04T04:46:49","guid":{"rendered":"https:\/\/developer.kore.ai\/v10-2\/?p=21333"},"modified":"2024-07-22T13:14:28","modified_gmt":"2024-07-22T12:14:28","slug":"conversation-history-api","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v10-2\/docs\/bots\/api-guide\/conversation-history-api\/","title":{"rendered":"Conversation History API"},"content":{"rendered":"<section class=\"l-section wpb_row height_auto\"><div class=\"l-section-h i-cf\"><div class=\"g-cols vc_row type_default valign_top\"><div class=\"vc_col-sm-12 wpb_column vc_column_container\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\">\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<p>To fetch the conversational messages between the bot and user in reverse chronological order. This API supports pagination. You can provide offset\/skip and limit to get a certain number of messages at a time.<\/p>\n<table>\n<tbody>\n<tr>\n<td><strong>Method<\/strong><\/td>\n<td>GET and POST<\/td>\n<\/tr>\n<tr>\n<td><strong>Endpoint<\/strong><\/td>\n<td>This API has two versions for GET and POST methods. The v1 of the API includes messages associated with all tasks, and it has a maximum limit of 100 messages per request. The v2 of the API does not include the messages related to Alert and Action tasks, and it has a maximum limit of 10,000 messages per request.<\/p>\n<p><strong>GET Method<\/strong><br \/>\nVersion 1: <code>https:\/\/{{host}}\/api\/public\/bot\/{{botId}}\/getMessages?userId={{userId}}&amp;limit=10&amp;dateFrom=2023-05-20&amp;dateTo=2023-05-25<\/code><br \/>\nVersion 2: <code>https:\/\/{{host}}\/api\/public\/bot\/{{botId}}\/getMessagesV2?userId={{userId}}&amp;limit=10&amp;dateFrom=2023-05-20&amp;dateTo=2023-05-25<\/code><\/p>\n<div class=\"alert alert-info\">\n<p><strong>Note<\/strong>: The GET method shows the RTM interactions by default. To get the channel-specific interaction, use the channelType parameter in the GET method. For the channelType parameter values, see <a href=\"https:\/\/developer.kore.ai\/v10-2\/docs\/bots\/api-guide\/conversation-history-api\/#Request_Body_Parameters\">Request Body Parameters<\/a> section.<\/p>\n<\/div>\n<p><strong>POST Method<\/strong><br \/>\nVersion 1:<br \/>\n<code>https:\/\/{{host}}\/api\/public\/bot\/{{botId}}\/getMessages<\/code><br \/>\nand <code>https:\/\/{{host}}\/api\/public\/getMessages<\/code> for Bot Admin Console.<br \/>\nVersion 2:<br \/>\n<code>https:\/\/{{host}}\/api\/public\/bot\/{{botId}}\/getMessagesV2<\/code><\/td>\n<\/tr>\n<tr>\n<td><strong>accept-encoding<\/strong><\/td>\n<td><code>gzip, deflate, br<\/code><br \/>\nThis allows the server to compress the response using any of these algorithms (gzip, deflate, or Brotli) before sending it back, which makes the response size smaller and faster to transmit over the network, thereby improving the overall performance of the API communication.<\/p>\n<div class=\"alert alert-info\"><b>Note:<\/b> We recommend using this header element in v2 of the GET and the POST methods.<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td><strong>Content Type<\/strong><\/td>\n<td><code>application\/json<\/code><\/td>\n<\/tr>\n<tr>\n<td><strong>Authorization<\/strong><\/td>\n<td><code>auth: {{JWT}}<\/code><\/p>\n<p>See <a href=\"https:\/\/developer.kore.ai\/v10-2\/docs\/bots\/api-guide\/apis\/#Generating_the_JWT_Token\" target=\"_blank\" rel=\"noopener noreferrer\">How to generate the JWT Token.<\/a><\/td>\n<\/tr>\n<tr>\n<td><strong>API Scope<\/strong><\/td>\n<td>\n<ul>\n<li>Bot Builder: Chat History<br \/>\nOR<\/li>\n<li>Admin Console: Bot Analytics &gt; Chat History<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small\"><\/div><\/div><\/div><\/div><\/div><\/div><\/section><section class=\"l-section wpb_row height_auto\"><div class=\"l-section-h i-cf\"><div class=\"g-cols vc_row type_default valign_top\"><div class=\"vc_col-sm-12 wpb_column vc_column_container\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\"><div class=\"ult-spacer spacer-6ae8b9cae3081\" data-id=\"6ae8b9cae3081\" data-height=\"12\" data-height-mobile=\"12\" data-height-tab=\"12\" data-height-tab-portrait=\"\" data-height-mobile-landscape=\"\" style=\"clear:both;display:block;\"><\/div><\/div><\/div><\/div><\/div><\/div><\/section><section class=\"l-section wpb_row height_auto\"><div class=\"l-section-h i-cf\"><div class=\"g-cols vc_row type_default valign_top\"><div class=\"vc_col-sm-12 wpb_column vc_column_container\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\">\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h2><span class=\"ez-toc-section\" id=\"Path_Parameters\">Path Parameters<\/span><\/h2>\n<table>\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th>Required\/Optional<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>host<\/td>\n<td>required<\/td>\n<td>Environment URL, for example, https:\/\/bots.kore.ai<\/td>\n<\/tr>\n<tr>\n<td>botId<\/td>\n<td>optional<\/td>\n<td>Bot ID or Stream ID. You can access it from the General Settings page of the bot.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><span class=\"ez-toc-section\" id=\"Sample_Request\">Sample Request<\/span><\/h2>\n<p><strong>Sample Request for GET Method<\/strong><\/p>\n<p>Version 1:<\/p>\n<pre class=\"\">curl -X GET \\\r\n'https:\/\/{{host}}\/api\/public\/bot\/{{botId}}\/getMessages?userId={{userId}}&amp;limit=10&amp;dateFrom=2023-05-20&amp;dateTo=2023-05-25' \\\r\n--header 'auth: {{YOUR_JWT_ACCESS_TOKEN}}'\r\n<\/pre>\n<p>Version 2:<\/p>\n<pre class=\"\">curl -X GET --compressed --location \\\r\n'https:\/\/{{host}}\/api\/public\/bot\/{{botId}}\/getMessagesV2?userId={{userId}}&amp;limit=10&amp;dateFrom=2023-05-20&amp;dateTo=2023-05-25' \\\r\n--header 'accept-encoding: gzip, deflate, br' \\\r\n--header 'Content-Type: application\/json' \\\t\r\n--header 'auth: {{YOUR_JWT_ACCESS_TOKEN}}'\r\n<\/pre>\n<p><strong>Sample Request for POST method<\/strong><\/p>\n<p>Version 1:<\/p>\n<pre>curl -X POST \\\r\n  'https:\/\/{{host}}\/api\/public\/bot\/{{botId}}\/getMessages' \\\r\n  --header 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \\\r\n  --header 'Content-Type: application\/json' \\\r\n  --data '{\r\n    \"userId\"           : \"u-xxxx-xxxxx-xxxx\",\r\n    \"skip\"             : 0,                           \r\n    \"limit\"            : 100,                       \r\n    \"dateFrom\"         : \"2019-04-01\",\r\n    \"dateTo\"           : \"2019-04-01\",\r\n    \"channelType\"      : \"rcs\",\r\n    \"sessionId\"        : [\"5eadxxxxxxxxxxxxx\",\"5ebxxxxxxxxxxxxxxx\"],\r\n    <span style=\"font-weight: 400;\">\u201cincludeTraceId\u201d\u00a0 : \u201ctrue\u201d<\/span>\r\n    \"tags\"\t       : {\r\n    \"and\"    : [\r\n\t\t      {\r\n\t\t        \"name\"  : \"tagname\",\r\n\t\t        \"values\"  : [\"tagvalue1\",\"tagvalue2\"],\r\n                        \"type\"    : \"tagtype\"\r\n                      },\r\n                     {\r\n                        \"name\"  : \"tagname\",\r\n    \t\t        \"values\"  : [\"tagvalue1\",\"tagvalue2\"],\r\n                        \"type\"    : \"tagtype\"  \r\n                     }\r\n                     ]\t\r\n                }\r\n          }'\r\n<\/pre>\n<p>Version 2:<\/p>\n<pre>  curl -X POST --compressed --location \\\r\n  'https:\/\/{{host}}\/api\/public\/bot\/{{botId}}\/getMessagesV2' \\\r\n  --header 'accept-encoding: gzip, deflate, br' \\\r\n  --header 'Content-Type: application\/json' \\\r\n  --header 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \\\r\n  --data '{\r\n    \"userId\"          : \"u-xxxx-xxxxx-xxxx\",\r\n    \"skip\"            : 0,                           \r\n    \"limit\"           : 100,                       \r\n    \"dateFrom\"        : \"2019-04-01\",\r\n    \"dateTo\"          : \"2019-04-01\",\r\n    \"channelType\"     : \"rcs\",\r\n    \"sessionId\"       : [\"5eadxxxxxxxxxxxxx\",\"5ebxxxxxxxxxxxxxxx\"],\r\n    <span style=\"font-weight: 400;\">\u201cincludeTraceId\u201d\u00a0 : \u201ctrue\u201d<\/span>\r\n    \"tags\"\t      : {\r\n    \"and\"   : [\r\n\t\t\t   {\r\n\t\t\t       \"name\"    : \"tagname\",\r\n\t\t\t       \"values\"  : [\"tagvalue1\",\"tagvalue2\"],\r\n                               \"type\"    : \"tagtype\"\r\n                           },\r\n                           {\r\n                              \"name\"    : \"tagname\",\r\n    \t\t\t      \"values\"  : [\"tagvalue1\",\"tagvalue2\"],\r\n                              \"type\"    : \"tagtype\"  \t\r\n                          }\r\n                          ]\t\r\n                    }\r\n            }'\r\n<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"Request_Query_Parameters\">Request Query Parameters<\/span><\/h2>\n<table>\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th>Required\/Optional<\/th>\n<th>Description<\/th>\n<\/tr>\n<tr>\n<td>userId<\/td>\n<td>required for GET<\/p>\n<p>optional for POST<\/td>\n<td>The ID of the user whose conversation history to access. Can be user email id or enterprise assigned unique id.<\/td>\n<\/tr>\n<tr>\n<td>skip\/offset<\/td>\n<td>optional<\/td>\n<td>The number of messages to be skipped.<\/td>\n<\/tr>\n<tr>\n<td>limit<\/td>\n<td>optional<\/td>\n<td>The number of messages to be shown on each page.<\/td>\n<\/tr>\n<tr>\n<td>channelType<\/td>\n<td>optional<\/td>\n<td>Channel type name for which you want to see the interactions; the default is &#8220;rtm&#8221; .<\/p>\n<p>Accepted channel types are:<\/p>\n<ul>\n<li>&#8220;skypeforbusiness&#8221;,<\/li>\n<li>&#8220;msteams&#8221;,<\/li>\n<li>&#8220;twitter&#8221;,<\/li>\n<li>&#8220;spark&#8221;,<\/li>\n<li>&#8220;rtm&#8221;,<\/li>\n<li>&#8220;facebook&#8221;,<\/li>\n<li>&#8220;slack&#8221;,<\/li>\n<li>&#8220;skype&#8221;,<\/li>\n<li>&#8220;kore&#8221;,<\/li>\n<li>&#8220;email&#8221;,<\/li>\n<li>&#8220;sms&#8221;,<\/li>\n<li>&#8220;wfacebook&#8221;,<\/li>\n<li>&#8220;ringcentral&#8221;,<\/li>\n<li>&#8220;jabber&#8221;,<\/li>\n<li>&#8220;yammer&#8221;,<\/li>\n<li>&#8220;alexa&#8221;,<\/li>\n<li>&#8220;twiliovoice&#8221;,<\/li>\n<li>&#8220;telegram&#8221;,<\/li>\n<li>&#8220;ivr&#8221;,<\/li>\n<li>&#8220;ivrVoice&#8221;,<\/li>\n<li>&#8220;smartassist&#8221;,<\/li>\n<li>&#8220;line&#8221;,<\/li>\n<li>&#8220;liveperson&#8221;,<\/li>\n<li>&#8220;googleactions&#8221;,<\/li>\n<li>&#8220;hangoutchat&#8221;,<\/li>\n<li>&#8220;mattermost&#8221;,<\/li>\n<li>&#8220;rcs&#8221;.<\/li>\n<\/ul>\n<p><b>Note<\/b>: In case of multi-webhook channel configuration, \u201civr\u201d gives the conversations for the first WebHook instance. For other WebHoo instance, specify the<code>ivrInstID<\/code>, you can get it from the WebHook URL which is of the form: <code>{{host_url}}\/chatbot\/hooks\/{{BotId}}\/hookInstance\/{{ivrInstID}}<\/code>)<\/td>\n<\/tr>\n<tr>\n<td>dateFrom<\/td>\n<td>optional<\/td>\n<td>Accepts the yyyy-mm-dd date format.<br \/>\n(or) yyyy-mm-ddThh:mm:ss.msZ<br \/>\neg:2019-04-01 (or) 2019-04-01T13:25:58.515ZIf not provided, calculated as 7 days behind <em>dateTo<\/em>.<br \/>\n<b>Note<\/b>: This field cannot be used in combination with msgId.<\/td>\n<\/tr>\n<tr>\n<td>dateTo<\/td>\n<td>optional<\/td>\n<td>Accepts the yyyy-mm-dd date format.<br \/>\n(or) yyyy-mm-ddThh:mm:ss.msZ<br \/>\neg:2019-04-01 (or) 2019-04-01 T13:26:05.598ZIf not provided, calculated as 7 days from <em>dateFrom<\/em>. If <em>dateFrom<\/em> is also not provided then set to <strong>Today<\/strong>.<br \/>\n<b>Note<\/b>: This field cannot be used in combination with msgId<\/td>\n<\/tr>\n<tr>\n<td>getAgentsInfo<\/td>\n<td>optional<\/td>\n<td>Accepts true or false. If the value is true then the agent info is fetched and put in the author object of the agent. If the value is false or the field is not provided then agent info is not passed in the response.<\/td>\n<\/tr>\n<\/thead>\n<\/table>\n<div class=\"alert alert-info\">\n<p><strong>Note<\/strong>: The duration between <em>dateTo<\/em> and <em>dateFrom<\/em> should be less than 7 days, else an error will be thrown.<\/p>\n<\/div>\n<h2><span class=\"ez-toc-section\" id=\"Request_Body_Parameters\">Request Body Parameters<\/span><\/h2>\n<table>\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th>Required\/Optional<\/th>\n<th>Description<\/th>\n<\/tr>\n<tr>\n<td>skip\/offset<\/td>\n<td>optional<\/td>\n<td>The number of messages to be skipped.<\/td>\n<\/tr>\n<tr>\n<td>limit<\/td>\n<td>optional<\/td>\n<td>The number of messages to be shown on each page.<\/td>\n<\/tr>\n<tr>\n<td>forward<\/td>\n<td>optional<\/td>\n<td>Takes string values &#8211; &#8220;true&#8221; or &#8220;false&#8221;. <span style=\"font-family: inherit; font-size: inherit;\">Specifies the direction of the messages to be retrieved.<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">If the value is &#8220;true&#8221;, then the conversation history is retrieved in the order old to the most recent one.<\/span><\/li>\n<li style=\"font-weight: 400;\">If the value is &#8220;false,&#8221; then the conversation history is retrieved in reverse order, from the most recent to the oldest message.<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td>msgId<\/td>\n<td>optional<\/td>\n<td>A specific Message-Id if known. This would fetch the records starting from that message either forward or backward depending upon the direction (see below) requested.<\/p>\n<p>In case only the specific conversation is required, set the limit to 1<\/p>\n<p><u>Note<\/u>: This field cannot be used in combination with dateFrom and dateTo.<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">includeTraceId<\/span><\/td>\n<td>optional<\/td>\n<td><span style=\"font-weight: 400;\">Whether to include the trace ID in the response. A trace ID is a unique ID assigned to each incoming message.\u00a0 Possible values of the parameter:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><i><span style=\"font-weight: 400;\">true<\/span><\/i><span style=\"font-weight: 400;\">: Include the trace ID in the response.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><i style=\"font-family: inherit; font-size: inherit;\">false<\/i><span style=\"font-weight: 400;\">: Default value, indicates not to include the trace ID in the response.<\/span><\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td>direction<\/td>\n<td>optional when msgId is given<\/td>\n<td>\n<ul>\n<li>&lt;0 reverse<\/li>\n<li>=0 bidirectional<\/li>\n<li>&gt;0 forward<\/li>\n<\/ul>\n<p>Default direction is forward.<\/td>\n<\/tr>\n<tr>\n<td>sessionId<\/td>\n<td>optional<\/td>\n<td>A specific Session-Id if known. <a href=\"\/docs\/bots\/api-guide\/sessions-api\/\">Refer here to obtain the session id<\/a><\/td>\n<\/tr>\n<tr>\n<td>tags<\/td>\n<td>optional<\/td>\n<td>Meta tags to filter the conversations.<\/td>\n<\/tr>\n<tr>\n<td>getAgentsInfo<\/td>\n<td>optional<\/td>\n<td>Accepts true or false. If the value is true then the agent info is fetched and put in the author object of the agent. If the value is false or the field is not provided then agent info is not passed in the response.<\/td>\n<\/tr>\n<\/thead>\n<\/table>\n<p>&nbsp;<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Sample_Response\">Sample Response<\/span><\/h2>\n<p><strong>Sample response for the GET method<\/strong><\/p>\n<pre class=\"code-limit-400px\">{\r\n\"total\": 1,\r\n\"moreAvailable\": false,\r\n\"icon\": \"https:\/\/dlnwzkim0wron.cloudfront.net\/f-87c47629-7exxxxxxxx-a807ccfb1cf0.png\",\r\n\"messages\": [\r\n{\r\n\"_id\": \"ms-fee996b9-0485-55a3-bf42-417c1272aff4\",\r\n            \"channels\": [\r\n                {\r\n                    \"type\": \"rtm\",\r\n                    \"channelUId\": \u201calan.walker@abc.com\"\r\n                }\r\n            ],\r\n            \"type\": \"incoming\",\r\n            \"status\": \"received\",\r\n            \"createdBy\": \"u-1bc0993f-e0d6-5589-973d-6fe2663de2d4\",\r\n            \"lmodifiedBy\": \"u-1bc0993f-e0d6-5589-973d-6fe2663de2d4\",\r\n            \"createdOn\": \"2023-07-18T09:46:46.925Z\",\r\n            \"lmodifiedOn\": \"2023-07-18T09:46:46.925Z\",\r\n            \"botId\": \"st-369f9021-2a85-5b32-9005-63139d57c2e5\",\r\n            \"orgId\": \"o-f4b49c0a-f027-57bf-aef0-b68ad9b51ee2\",\r\n            \"accountId\": \"6461f97ed43763474b34e56e\",\r\n            \"isBB\": 1,\r\n            \"ms\": 1,\r\n            \"chnl\": \"rtm\",\r\n            \"isD\": 1,\r\n            \"components\": [\r\n                {\r\n                    \"_id\": \"cp-ae11791d-118f-53f1-8905-9bc9f03fdece\",\r\n                    \"cT\": \"text\",\r\n                    \"data\": {\r\n                        \"text\": \"hi\"\r\n                    },\r\n                    \"thumbnails\": []\r\n                }\r\n            ],\r\n            \"timestampValue\": 1689673606939,\r\n            \"__v\": 0,\r\n            \"lang\": \"en\",\r\n            \"sT\": 1,\r\n            \"sessionId\": \"64b65f87277b464507f778c0\",\r\n            \"cluster_id\": \"Others\",\r\n            \"resourceid\": \"messagestore\",\r\n            \"tags\": {\r\n                \"messageTags\": [],\r\n                \"userTags\": [\r\n                    {\r\n                        \"value\": \"Alan\",\r\n                        \"name\": \"Alan Walker\"\r\n                    }\r\n                ],\r\n                \"sessionTags\": [],\r\n                \"altText\": []\r\n            },\r\n            \"traceId\": \"5371b61d-b1bb-4432-80de-7430772b0cfb\"\r\n        },\r\n        {\r\n            \"_id\": \"ms-5436a303-0d8c-58e8-8ad3-33bf5bcefcb7\",\r\n            \"channels\": [\r\n                {\r\n                    \"type\": \"rtm\",\r\n                    \"channelUId\": \u201calan.walker@abc.com\"\r\n                }\r\n            ],\r\n            \"type\": \"outgoing\",\r\n            \"status\": \"pending\",\r\n            \"createdOn\": \"2023-07-18T09:46:47.497Z\",\r\n            \"lmodifiedOn\": \"2023-07-18T09:46:47.497Z\",\r\n            \"createdBy\": \"u-1bc0993f-e0d6-5589-973d-6fe2663de2d4\",\r\n            \"components\": [\r\n                {\r\n                    \"_id\": \"cp-c035b2f4-10f2-5294-b655-c2d6273e0154\",\r\n                    \"cT\": \"text\",\r\n                    \"data\": {\r\n                        \"text\": \"Hey :)\"\r\n                    },\r\n                    \"thumbnails\": []\r\n                }\r\n            ],\r\n            \"botId\": \"st-369f9021-2a85-5b32-9005-63139d57c2e5\",\r\n            \"orgId\": \"o-f4b49c0a-f027-57bf-aef0-b68ad9b51ee2\",\r\n            \"accountId\": \"6461f97ed43763474b34e56e\",\r\n            \"tN\": \"WebAlert\",\r\n            \"isBB\": 1,\r\n            \"ms\": 1,\r\n            \"chnl\": \"rtm\",\r\n            \"isD\": 1,\r\n            \"lang\": \"en\",\r\n            \"timestampValue\": 1689673607507,\r\n            \"__v\": 0,\r\n            \"sT\": 1,\r\n            \"sessionId\": \"64b65f87277b464507f778c0\",\r\n            \"resourceid\": \"messagestore\",\r\n            \"tags\": {\r\n                \"messageTags\": [],\r\n                \"userTags\": [\r\n                    {\r\n                        \"value\": \"Alan\",\r\n                        \"name\": \"Alan Walker\"\r\n                    }\r\n                ],\r\n                \"sessionTags\": [],\r\n                \"altText\": []\r\n            }\r\n        },\r\n\r\n<\/pre>\n<p><strong>Sample Response from POST method:<\/strong><\/p>\n<pre class=\"code-limit-400px\">{\r\n  \"total\": 1,\r\n  \"moreAvailable\": false,\r\n  \"messages\"  : [\r\n                {\r\n                  \"_id\": \"ms-xxxxxxxxxxxxxxxxxxxx\",\r\n                  \"type\": \"incoming\",\r\n                  \"status\": \"sent to cs\",\r\n                  \"createdBy\":\"u-xxxxxxxxxxxxxxxxxxx\",\r\n                  \"lmodifiedBy\": u-xxxxxxxxxxxxxxxxxxx\",\r\n                  \"lmodifiedOn\": \"2019-04-10T10:21:45.103Z\",\r\n                  \"channels\": [\r\n                     {\r\n                      \"type\": \"rcs\"\r\n                        }\r\n                     ],\r\n                  \"botId\":\"st-xxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\r\n                  \"orgId\": \u201co-xxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\r\n                  \"accountId\": \"5xxxxxxxxxxxxxxxxxxxxxxxx\",\r\n                  \"isBB\": 0,\r\n                  \"ms\": 1,\r\n                  \"channel\": \"rcs\",\r\n                  \"components\": [\r\n                    {\r\n                      \"_id\":\"cp-xxxxxxxxxxx\",\r\n                      \"cT\": \"text\",\r\n                      \"data\": {\r\n                          \"text\": \"23\"\r\n                           },\r\n                      \"thumbnails\": []\r\n                      }\r\n                    ],\r\n                    \"createdOn\": \"2019-04-10T10:21:45.106Z\",\r\n                    \"timestampValue\": 1554891705106,\r\n                    \"__v\": 0,\r\n                    \"sessionId\": \"5cadbefc6a81a71559f6bece\"\r\n               }\r\n             ]\r\n }\r\n<\/pre>\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<\/div><\/div><\/div><\/div><\/div><\/section><section class=\"l-section wpb_row height_auto\"><div class=\"l-section-h i-cf\"><div class=\"g-cols vc_row type_default valign_top\"><div class=\"vc_col-sm-12 wpb_column vc_column_container\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\">\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h2><span class=\"ez-toc-section\" id=\"Response_Body_Parameters\">Response Body Parameters<\/span><\/h2>\n<table>\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th>Description<\/th>\n<\/tr>\n<tr>\n<td>total<\/td>\n<td>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 \u2018moreAvailable\u2019 field in the response will have the value as \u2018True\u2019.<\/p>\n<p>It is recommended to programmatically iterate the request by dynamically updating the values of the \u2018skip\u2019 and \u2018limit\u2019 parameters in the request.<\/td>\n<\/tr>\n<tr>\n<td>moreAvailable<\/td>\n<td>Indicates if the API has returned all the records or if more are available, based on the pagination criteria.<br \/>\n<strong>True<\/strong> if more records are available. <strong>False<\/strong> if there are no more records to be retrieved.<\/td>\n<\/tr>\n<tr>\n<td>icon<\/td>\n<td>The URL of the bot logo.<\/td>\n<\/tr>\n<tr>\n<td>messages<\/td>\n<td>Contains complete information about the message.<\/td>\n<\/tr>\n<tr>\n<td>messages._id<\/td>\n<td>The unique identifier for the message record.<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">messages.traceId<\/span><\/td>\n<td><span style=\"font-weight: 400;\">A unique identifier associated with each incoming message.<\/span><\/p>\n<div class=\"alert alert-info\"><b>Note<\/b><span style=\"font-weight: 400;\">: The <\/span><b>Trace ID<\/b><span style=\"font-weight: 400;\"> is retained in the logs for <\/span><span style=\"font-weight: 400;\">30 days. Once the <\/span><b>Trace ID<\/b><span style=\"font-weight: 400;\"> is expired, you see a tooltip message as<\/span> &#8216;<code>Trace Id: Trace records for this message are not available<\/code><span style=\"font-weight: 400;\">&#8216;.<\/span><\/div>\n<\/td>\n<\/tr>\n<tr>\n<td>messages.type<\/td>\n<td>The message type &#8211; incoming (user input) or outgoing (bot response).<\/td>\n<\/tr>\n<tr>\n<td>messages.status<\/td>\n<td>Processing status of the message: received, queued, in progress, delivered, or pending.<\/td>\n<\/tr>\n<tr>\n<td>messages.lmodifiedOn<\/td>\n<td>The last modified time for the record.<\/td>\n<\/tr>\n<tr>\n<td>messages.createdBy<\/td>\n<td>The user ID of the end user who was chatting with the bot.<\/td>\n<\/tr>\n<tr>\n<td>messages.channels<\/td>\n<td>The channels object provides additional information about the channel through which the conversation was initiated.<\/td>\n<\/tr>\n<tr>\n<td>messages.channels.type<\/td>\n<td>Name of the channel through which the conversation is initiated. The default is &#8216;rtm&#8217;.<\/td>\n<\/tr>\n<tr>\n<td>messages.channels.channelUId<\/td>\n<td>The end-user&#8217;s identity provided by the channel.<\/td>\n<\/tr>\n<tr>\n<td>messages.components<\/td>\n<td>Additional information about the message record.<\/td>\n<\/tr>\n<tr>\n<td>messages.components._id<\/td>\n<td>The unique id of the component.<\/td>\n<\/tr>\n<tr>\n<td>messages.components.cT<\/td>\n<td>Type of the user input (component type): text, audio, video, image, attachment, contact, task, filelink, location, email, alert, action, timeline, meeting, error, upgrade, NLResponse, or contextUpdate.<\/td>\n<\/tr>\n<tr>\n<td>messages.components.data<\/td>\n<td>The data object.<\/td>\n<\/tr>\n<tr>\n<td>messages.components.data.text<\/td>\n<td>The message shown to the user or the bot, depending on the message type.<\/td>\n<\/tr>\n<tr>\n<td>messages.components.thumbnails<\/td>\n<td>The thumbnails object.<\/td>\n<\/tr>\n<tr>\n<td>messages.components.thumbnails._id<\/td>\n<td>The unique id of the thumbnails.<\/td>\n<\/tr>\n<tr>\n<td>messages.components.thumbnails.width<\/td>\n<td>The width of the thumbnails.<\/td>\n<\/tr>\n<tr>\n<td>messages.components.thumbnails.height<\/td>\n<td>The height of the thumbnails.<\/td>\n<\/tr>\n<tr>\n<td>messages.components.thumbnails.size<\/td>\n<td>The size of the thumbnails.<\/td>\n<\/tr>\n<tr>\n<td>messages.components.thumbnails.url<\/td>\n<td>The URL of the thumbnails.<\/td>\n<\/tr>\n<tr>\n<td>messages.botId<\/td>\n<td>Bot ID or Stream ID.<\/td>\n<\/tr>\n<tr>\n<td>messages.orgId<\/td>\n<td>The organization ID to which the bot belongs to.<\/td>\n<\/tr>\n<tr>\n<td>messages.accountId<\/td>\n<td>The account id to which the bot belongs to.<\/td>\n<\/tr>\n<tr>\n<td>messages.tN<\/td>\n<td>The task name.<\/td>\n<\/tr>\n<tr>\n<td>messages.isBB<\/td>\n<td>Informs whether the conversation was initiated from the Bot Builder; 1 for Yes, 0 for No.<\/td>\n<\/tr>\n<tr>\n<td>messages.isD<\/td>\n<td>Informs whether the conversation was initiated by a developer; 1 for Yes, 0 for No.<\/td>\n<\/tr>\n<tr>\n<td>messages.lang<\/td>\n<td>The conversation&#8217;s language.<\/td>\n<\/tr>\n<tr>\n<td>messages.ms<\/td>\n<td>Message source; enum[0,1,2,3]; 0-task alert, 1-text, 2-task(action), and 3-others.<\/td>\n<\/tr>\n<tr>\n<td>messages.chnl<\/td>\n<td>The end user&#8217;s conversation channel.<\/td>\n<\/tr>\n<tr>\n<td>messages.createdOn<\/td>\n<td>The record creation date.<\/td>\n<\/tr>\n<tr>\n<td>messages.timestampValue<\/td>\n<td>The creation date converted into the timestamp format.<\/td>\n<\/tr>\n<tr>\n<td>messages.__v<\/td>\n<td>The field is used for internal purposes. No specific significance.<\/td>\n<\/tr>\n<tr>\n<td>messages.resourceid<\/td>\n<td>The field is used for internal purposes. No specific significance.<\/td>\n<\/tr>\n<tr>\n<td>messages.tags<\/td>\n<td>Meta tags to filter the conversations.<\/td>\n<\/tr>\n<tr>\n<td>messages.tags.messageTags<\/td>\n<td>Message tags array; custom tags added to the message in the conversation.<\/td>\n<\/tr>\n<tr>\n<td>messages.tags.messageTags.value<\/td>\n<td>Tag&#8217;s value.<\/td>\n<\/tr>\n<tr>\n<td>messages.tags.messageTags.name<\/td>\n<td>Tag&#8217;s name.<\/td>\n<\/tr>\n<tr>\n<td>messages.tags.userTags<\/td>\n<td>User tags array; custom tags added to the user&#8217;s profile information.<\/td>\n<\/tr>\n<tr>\n<td>messages.tags.userTags.value<\/td>\n<td>Tag&#8217;s value.<\/td>\n<\/tr>\n<tr>\n<td>messages.tags.userTags.name<\/td>\n<td>Tag&#8217;s name.<\/td>\n<\/tr>\n<tr>\n<td>messages.tags.sessionTags<\/td>\n<td>Session tags array; custom tags added to the conversation session.<\/td>\n<\/tr>\n<tr>\n<td>messages.tags.sessionTags.value<\/td>\n<td>Tag&#8217;s value.<\/td>\n<\/tr>\n<tr>\n<td>messages.tags.sessionTags.name<\/td>\n<td>Tag&#8217;s name.<\/td>\n<\/tr>\n<tr>\n<td>messages.tags.altText<\/td>\n<td>AltText tags array; the Alternative text added to the defined JavaScript message. <a href=\"https:\/\/developer.kore.ai\/v10-2\/docs\/bots\/analyzing-your-bot\/conversation-history-dashboard\/#Define_Alternate_Text_for_JavaScript_Messages\" target=\"_blank\" rel=\"noopener noreferrer\">Learn more<\/a>.<\/td>\n<\/tr>\n<tr>\n<td>messages.tags.altText.value<\/td>\n<td>Alternate text tag&#8217;s value.<\/td>\n<\/tr>\n<tr>\n<td>messages.tags.altText.name<\/td>\n<td>Alternate text\u00a0 tag&#8217;s name.<\/td>\n<\/tr>\n<\/thead>\n<\/table>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<\/div><\/div><\/div><\/div><\/div><\/section><section class=\"l-section wpb_row height_auto\"><div class=\"l-section-h i-cf\"><div class=\"g-cols vc_row type_default valign_top\"><div class=\"vc_col-sm-12 wpb_column vc_column_container\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\"><div class=\"ult-spacer spacer-6ae8b9cae4b65\" data-id=\"6ae8b9cae4b65\" data-height=\"40\" data-height-mobile=\"40\" data-height-tab=\"40\" data-height-tab-portrait=\"\" data-height-mobile-landscape=\"\" style=\"clear:both;display:block;\"><\/div><\/div><\/div><\/div><\/div><\/div><\/section>\n","protected":false},"excerpt":{"rendered":"To fetch the conversational messages between the bot and user in reverse chronological order. This API supports pagination. You can provide offset\/skip and limit to get a certain number of messages at a time. Method GET and POST Endpoint This API has two versions for GET and POST methods. The v1 of the API includes...","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-21333","post","type-post","status-publish","format-standard","hentry","category-api-guide"],"_links":{"self":[{"href":"https:\/\/developer.kore.ai\/v10-2\/wp-json\/wp\/v2\/posts\/21333","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.kore.ai\/v10-2\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developer.kore.ai\/v10-2\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-2\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-2\/wp-json\/wp\/v2\/comments?post=21333"}],"version-history":[{"count":92,"href":"https:\/\/developer.kore.ai\/v10-2\/wp-json\/wp\/v2\/posts\/21333\/revisions"}],"predecessor-version":[{"id":62031,"href":"https:\/\/developer.kore.ai\/v10-2\/wp-json\/wp\/v2\/posts\/21333\/revisions\/62031"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v10-2\/wp-json\/wp\/v2\/media?parent=21333"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-2\/wp-json\/wp\/v2\/categories?post=21333"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-2\/wp-json\/wp\/v2\/tags?post=21333"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}