Search conversations
curl --request GET \
--url https://www.chatbase.co/api/v2/agents/{agentId}/conversations/search \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.chatbase.co/api/v2/agents/{agentId}/conversations/search"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://www.chatbase.co/api/v2/agents/{agentId}/conversations/search', 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://www.chatbase.co/api/v2/agents/{agentId}/conversations/search",
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://www.chatbase.co/api/v2/agents/{agentId}/conversations/search"
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://www.chatbase.co/api/v2/agents/{agentId}/conversations/search")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.chatbase.co/api/v2/agents/{agentId}/conversations/search")
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": [
{
"id": "<string>",
"title": "<string>",
"createdAt": 123,
"updatedAt": 123,
"userId": "<string>",
"source": "API",
"embedOrigin": "https://www.example.com/pricing",
"status": "ongoing",
"sentiment": "neutral",
"country": "Egypt",
"topics": [
"<string>"
],
"snippet": {
"speaker": "user",
"highlights": [
{
"value": "<string>",
"isHit": true
}
]
},
"parentConversationId": "<string>",
"parentSummary": "<string>"
}
],
"pagination": {
"cursor": "<string>",
"hasMore": true,
"total": 123
}
}Conversations
Search conversations
Search an agent’s conversations by text, filters, or both. With query, results are ranked and carry a highlighted snippet; without it, most recently active first. Filters combine with AND; comma-separated values within a filter with OR. Covers conversations created since the 1st of the month 12 months ago (UTC), activity-date filters included. Results lag new messages by a few seconds. A page can hold fewer than limit items, even none, while hasMore is true; keep paging. Read messages via export with conversationId.
GET
/
agents
/
{agentId}
/
conversations
/
search
Search conversations
curl --request GET \
--url https://www.chatbase.co/api/v2/agents/{agentId}/conversations/search \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.chatbase.co/api/v2/agents/{agentId}/conversations/search"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://www.chatbase.co/api/v2/agents/{agentId}/conversations/search', 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://www.chatbase.co/api/v2/agents/{agentId}/conversations/search",
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://www.chatbase.co/api/v2/agents/{agentId}/conversations/search"
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://www.chatbase.co/api/v2/agents/{agentId}/conversations/search")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.chatbase.co/api/v2/agents/{agentId}/conversations/search")
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": [
{
"id": "<string>",
"title": "<string>",
"createdAt": 123,
"updatedAt": 123,
"userId": "<string>",
"source": "API",
"embedOrigin": "https://www.example.com/pricing",
"status": "ongoing",
"sentiment": "neutral",
"country": "Egypt",
"topics": [
"<string>"
],
"snippet": {
"speaker": "user",
"highlights": [
{
"value": "<string>",
"isHit": true
}
]
},
"parentConversationId": "<string>",
"parentSummary": "<string>"
}
],
"pagination": {
"cursor": "<string>",
"hasMore": true,
"total": 123
}
}