Investigate a chat session by ticket number
curl --request GET \
--url http://localhost:8080/chat/sessions/ticket/{ticket_number}/investigation \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:8080/chat/sessions/ticket/{ticket_number}/investigation"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:8080/chat/sessions/ticket/{ticket_number}/investigation', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/chat/sessions/ticket/{ticket_number}/investigation",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:8080/chat/sessions/ticket/{ticket_number}/investigation"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:8080/chat/sessions/ticket/{ticket_number}/investigation")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/chat/sessions/ticket/{ticket_number}/investigation")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"session": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ticket_number": 123,
"status": "open",
"ai_closure_type": "assumed_resolved",
"sentiment": "angry",
"channel": {
"type": "web"
},
"assist_mode": true,
"language": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"contact": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "<string>",
"primary_external_id": "<string>",
"email": "[email protected]",
"phone_number": "<string>",
"name": "<string>",
"custom_data": {},
"non_verified_custom_data": {},
"created_at": "<string>",
"updated_at": "<string>",
"restricted_channels": [
"email"
],
"non_verified_name": "<string>",
"non_verified_email": "<string>"
},
"team": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>"
},
"assignee": {
"id": 123,
"name": "<string>",
"email": "[email protected]",
"avatar_url": "<string>"
},
"ticketing_system": {
"name": "dynamics365",
"external_id": "<string>",
"id_type": "conversation_id"
}
},
"recent_history": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"event_type": "<string>",
"sender_type": "contact",
"sender_name": "<string>",
"text": "<string>"
}
],
"history_stats": {
"total_events_loaded": 123,
"last_customer_message_at": "2023-11-07T05:31:56Z",
"last_ai_message_at": "2023-11-07T05:31:56Z",
"last_human_message_at": "2023-11-07T05:31:56Z"
},
"handoff": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"summary": "<string>",
"explanation": "<string>",
"sentiment": "angry",
"reasons": [
"ai_implied_handoff"
],
"references": [
{
"reference_type": "ai_profile",
"reference_id": "<string>"
}
],
"referenced_documents": {
"knowledge": [
"<string>"
],
"tools": [
"<string>"
],
"instructions": [
"<string>"
],
"ai_profile": [
"<string>"
],
"prohibited_topics": [
"<string>"
]
}
},
"tags": [
{
"tag_name": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
],
"csat": {
"id": "<string>",
"score": 123,
"comment": "<string>",
"channel": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"diagnostics": {
"handed_off": true,
"likely_root_causes": [
{
"code": "missing_instruction_or_coverage_gap",
"confidence": "low",
"evidence": [
"<string>"
]
}
],
"missing_data": [
"<string>"
]
},
"generated_at": "2023-11-07T05:31:56Z"
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}Sessions
Investigate a chat session by ticket number
Investigate a chat session by ticket number — Returns an investigation bundle for a ticket, including session summary, recent history, handoff evidence, tags, CSAT, and…
GET
/
chat
/
sessions
/
ticket
/
{ticket_number}
/
investigation
Investigate a chat session by ticket number
curl --request GET \
--url http://localhost:8080/chat/sessions/ticket/{ticket_number}/investigation \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:8080/chat/sessions/ticket/{ticket_number}/investigation"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:8080/chat/sessions/ticket/{ticket_number}/investigation', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/chat/sessions/ticket/{ticket_number}/investigation",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:8080/chat/sessions/ticket/{ticket_number}/investigation"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:8080/chat/sessions/ticket/{ticket_number}/investigation")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/chat/sessions/ticket/{ticket_number}/investigation")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"session": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ticket_number": 123,
"status": "open",
"ai_closure_type": "assumed_resolved",
"sentiment": "angry",
"channel": {
"type": "web"
},
"assist_mode": true,
"language": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"contact": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "<string>",
"primary_external_id": "<string>",
"email": "[email protected]",
"phone_number": "<string>",
"name": "<string>",
"custom_data": {},
"non_verified_custom_data": {},
"created_at": "<string>",
"updated_at": "<string>",
"restricted_channels": [
"email"
],
"non_verified_name": "<string>",
"non_verified_email": "<string>"
},
"team": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>"
},
"assignee": {
"id": 123,
"name": "<string>",
"email": "[email protected]",
"avatar_url": "<string>"
},
"ticketing_system": {
"name": "dynamics365",
"external_id": "<string>",
"id_type": "conversation_id"
}
},
"recent_history": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"event_type": "<string>",
"sender_type": "contact",
"sender_name": "<string>",
"text": "<string>"
}
],
"history_stats": {
"total_events_loaded": 123,
"last_customer_message_at": "2023-11-07T05:31:56Z",
"last_ai_message_at": "2023-11-07T05:31:56Z",
"last_human_message_at": "2023-11-07T05:31:56Z"
},
"handoff": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"summary": "<string>",
"explanation": "<string>",
"sentiment": "angry",
"reasons": [
"ai_implied_handoff"
],
"references": [
{
"reference_type": "ai_profile",
"reference_id": "<string>"
}
],
"referenced_documents": {
"knowledge": [
"<string>"
],
"tools": [
"<string>"
],
"instructions": [
"<string>"
],
"ai_profile": [
"<string>"
],
"prohibited_topics": [
"<string>"
]
}
},
"tags": [
{
"tag_name": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
],
"csat": {
"id": "<string>",
"score": 123,
"comment": "<string>",
"channel": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"diagnostics": {
"handed_off": true,
"likely_root_causes": [
{
"code": "missing_instruction_or_coverage_gap",
"confidence": "low",
"evidence": [
"<string>"
]
}
],
"missing_data": [
"<string>"
]
},
"generated_at": "2023-11-07T05:31:56Z"
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}Authorizations
Response
Default Response
Was this page helpful?