List AI Suggestions
curl --request GET \
--url https://app.livechatai.com/api/v2/ai-suggestions \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.livechatai.com/api/v2/ai-suggestions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.livechatai.com/api/v2/ai-suggestions', 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.livechatai.com/api/v2/ai-suggestions",
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.livechatai.com/api/v2/ai-suggestions"
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.livechatai.com/api/v2/ai-suggestions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.livechatai.com/api/v2/ai-suggestions")
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{
"status": "success",
"data": {
"agentId": "clx1234567890abcdef",
"suggestions": [
{
"id": "msg_abc123def456",
"userMessage": {
"id": "msg_user789xyz",
"text": "What is the warranty period for your products?"
},
"aiMessage": {
"id": "msg_abc123def456",
"text": "I'm sorry, I don't have information about that."
},
"evaluationTag": "OUT_OF_CONTEXT",
"potentialGap": "Warranty information is missing from the knowledge base",
"suggestedImprovement": "All our products come with a 2-year warranty. For details...",
"chatId": "chat_xyz789",
"createdAt": "2024-01-15T10:30:00Z"
}
],
"pagination": {
"page": 1,
"limit": 10,
"totalCount": 25,
"totalPages": 3,
"hasNextPage": true,
"hasPreviousPage": false
}
}
}AI Suggestions
List AI Suggestions
List AI suggestions for a specific agent. AI suggestions are automatically generated improvement suggestions based on conversations where the AI response may have been incomplete, out of context, or lacking depth.
GET
/
api
/
v2
/
ai-suggestions
List AI Suggestions
curl --request GET \
--url https://app.livechatai.com/api/v2/ai-suggestions \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.livechatai.com/api/v2/ai-suggestions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.livechatai.com/api/v2/ai-suggestions', 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.livechatai.com/api/v2/ai-suggestions",
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.livechatai.com/api/v2/ai-suggestions"
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.livechatai.com/api/v2/ai-suggestions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.livechatai.com/api/v2/ai-suggestions")
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{
"status": "success",
"data": {
"agentId": "clx1234567890abcdef",
"suggestions": [
{
"id": "msg_abc123def456",
"userMessage": {
"id": "msg_user789xyz",
"text": "What is the warranty period for your products?"
},
"aiMessage": {
"id": "msg_abc123def456",
"text": "I'm sorry, I don't have information about that."
},
"evaluationTag": "OUT_OF_CONTEXT",
"potentialGap": "Warranty information is missing from the knowledge base",
"suggestedImprovement": "All our products come with a 2-year warranty. For details...",
"chatId": "chat_xyz789",
"createdAt": "2024-01-15T10:30:00Z"
}
],
"pagination": {
"page": 1,
"limit": 10,
"totalCount": 25,
"totalPages": 3,
"hasNextPage": true,
"hasPreviousPage": false
}
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
The unique identifier of the agent (chatbot)
Example:
"clx1234567890abcdef"
Page number for pagination
Required range:
x >= 1Number of items per page (max 100)
Required range:
1 <= x <= 100Filter suggestions created after this date (ISO 8601 format)
Example:
"2024-01-01T00:00:00Z"
Filter suggestions created before this date (ISO 8601 format)
Example:
"2024-12-31T23:59:59Z"

