Conversations
Get a conversation's analysis
Takes the internal conversation ID that analysis events carry, not the id the conversation endpoints use. Returns the latest analysis and the latest evaluation for each criterion.
GET
/
api
/
v2
/
agents
/
{agentId}
/
analysis
/
{conversationId}
Get a conversation's analysis
curl --request GET \
--url https://app.cntillion.com/api/v2/agents/{agentId}/analysis/{conversationId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.cntillion.com/api/v2/agents/{agentId}/analysis/{conversationId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.cntillion.com/api/v2/agents/{agentId}/analysis/{conversationId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.cntillion.com/api/v2/agents/{agentId}/analysis/{conversationId}",
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 := "https://app.cntillion.com/api/v2/agents/{agentId}/analysis/{conversationId}"
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("https://app.cntillion.com/api/v2/agents/{agentId}/analysis/{conversationId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.cntillion.com/api/v2/agents/{agentId}/analysis/{conversationId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"conversationId": "<string>",
"source": "CONVERSATION_LOG",
"analysis": {
"id": "<string>",
"status": "<string>",
"error": "<string>",
"completedAt": "2023-11-07T05:31:56Z",
"result": {
"data": [
{
"identifier": "<string>",
"type": "string",
"value": "<string>",
"rationale": "<string>",
"scope": "conversation"
}
],
"sentiment": {
"label": "Positive",
"score": 0,
"frustration": 0.5,
"rationale": "<string>",
"trajectory": [
{
"turn": 2,
"score": 0
}
]
},
"topics": [
"<string>"
]
}
},
"evaluations": [
{
"id": "<string>",
"criterionId": "<string>",
"criterionName": "<string>",
"configuration": {
"model": "<string>",
"scope": "conversation",
"scoring": {
"kind": "binary"
},
"language": "auto",
"defaultModel": "auto",
"procedures": []
},
"score": 123,
"result": "<string>",
"rationale": "<string>",
"status": "<string>",
"error": "<string>",
"completedAt": "2023-11-07T05:31:56Z"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}Authorizations
workspaceApiKeyworkspaceApiKeyHeader
Path Parameters
Query Parameters
⌘I
Get a conversation's analysis
curl --request GET \
--url https://app.cntillion.com/api/v2/agents/{agentId}/analysis/{conversationId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.cntillion.com/api/v2/agents/{agentId}/analysis/{conversationId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.cntillion.com/api/v2/agents/{agentId}/analysis/{conversationId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.cntillion.com/api/v2/agents/{agentId}/analysis/{conversationId}",
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 := "https://app.cntillion.com/api/v2/agents/{agentId}/analysis/{conversationId}"
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("https://app.cntillion.com/api/v2/agents/{agentId}/analysis/{conversationId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.cntillion.com/api/v2/agents/{agentId}/analysis/{conversationId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"conversationId": "<string>",
"source": "CONVERSATION_LOG",
"analysis": {
"id": "<string>",
"status": "<string>",
"error": "<string>",
"completedAt": "2023-11-07T05:31:56Z",
"result": {
"data": [
{
"identifier": "<string>",
"type": "string",
"value": "<string>",
"rationale": "<string>",
"scope": "conversation"
}
],
"sentiment": {
"label": "Positive",
"score": 0,
"frustration": 0.5,
"rationale": "<string>",
"trajectory": [
{
"turn": 2,
"score": 0
}
]
},
"topics": [
"<string>"
]
}
},
"evaluations": [
{
"id": "<string>",
"criterionId": "<string>",
"criterionName": "<string>",
"configuration": {
"model": "<string>",
"scope": "conversation",
"scoring": {
"kind": "binary"
},
"language": "auto",
"defaultModel": "auto",
"procedures": []
},
"score": 123,
"result": "<string>",
"rationale": "<string>",
"status": "<string>",
"error": "<string>",
"completedAt": "2023-11-07T05:31:56Z"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}