List ticket messages
curl --request GET \
--url https://www.chatbase.co/api/v2/agents/{agentId}/helpdesk/tickets/{ticketNumber}/messages \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.chatbase.co/api/v2/agents/{agentId}/helpdesk/tickets/{ticketNumber}/messages"
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}/helpdesk/tickets/{ticketNumber}/messages', 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}/helpdesk/tickets/{ticketNumber}/messages",
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}/helpdesk/tickets/{ticketNumber}/messages"
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}/helpdesk/tickets/{ticketNumber}/messages")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.chatbase.co/api/v2/agents/{agentId}/helpdesk/tickets/{ticketNumber}/messages")
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>",
"type": "reply",
"sender": {
"type": "customer",
"id": "<string>",
"name": "<string>",
"email": "<string>"
},
"content": "<string>",
"contentText": "<string>",
"attachments": [
{
"name": "<string>",
"url": "<string>",
"type": "application/pdf",
"size": 123
}
],
"createdAt": "2026-07-25T10:15:00.000Z",
"metadata": {
"eventType": "status_change",
"statusFrom": "on_you",
"statusTo": "closed",
"doneBy": {
"id": "<string>",
"name": "<string>",
"email": "<string>",
"type": "agent"
},
"assignedTo": {
"id": "<string>",
"name": "<string>",
"email": "<string>",
"type": "agent"
},
"assignedFrom": {
"id": "<string>",
"name": "<string>",
"email": "<string>",
"type": "agent"
}
}
}
],
"pagination": {
"cursor": "<string>",
"hasMore": true,
"total": 123
}
}
Helpdesk
List ticket messages
Returns a ticket’s message thread in chronological order. Supports cursor-based pagination.
GET
/
agents
/
{agentId}
/
helpdesk
/
tickets
/
{ticketNumber}
/
messages
List ticket messages
curl --request GET \
--url https://www.chatbase.co/api/v2/agents/{agentId}/helpdesk/tickets/{ticketNumber}/messages \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.chatbase.co/api/v2/agents/{agentId}/helpdesk/tickets/{ticketNumber}/messages"
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}/helpdesk/tickets/{ticketNumber}/messages', 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}/helpdesk/tickets/{ticketNumber}/messages",
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}/helpdesk/tickets/{ticketNumber}/messages"
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}/helpdesk/tickets/{ticketNumber}/messages")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.chatbase.co/api/v2/agents/{agentId}/helpdesk/tickets/{ticketNumber}/messages")
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>",
"type": "reply",
"sender": {
"type": "customer",
"id": "<string>",
"name": "<string>",
"email": "<string>"
},
"content": "<string>",
"contentText": "<string>",
"attachments": [
{
"name": "<string>",
"url": "<string>",
"type": "application/pdf",
"size": 123
}
],
"createdAt": "2026-07-25T10:15:00.000Z",
"metadata": {
"eventType": "status_change",
"statusFrom": "on_you",
"statusTo": "closed",
"doneBy": {
"id": "<string>",
"name": "<string>",
"email": "<string>",
"type": "agent"
},
"assignedTo": {
"id": "<string>",
"name": "<string>",
"email": "<string>",
"type": "agent"
},
"assignedFrom": {
"id": "<string>",
"name": "<string>",
"email": "<string>",
"type": "agent"
}
}
}
],
"pagination": {
"cursor": "<string>",
"hasMore": true,
"total": 123
}
}
Authorizations
API key from your account settings
Path Parameters
The agent ID
Minimum string length:
1Example:
"5QHA6VB-DIAbBhxwqxfdi"
The ticket number
Required range:
x <= 2147483647Example:
123
Query Parameters
Opaque cursor from a previous response to fetch the next page
Example:
"eyJ0IjoiMjAyNC0wMS0xNVQxMDozMDowMC4wMDBaIiwiaWQiOiJhYmMxMjMifQ=="
Number of items per page (1 to 100, default 20)
Required range:
1 <= x <= 100Example:
20
Comma-separated message types. Defaults to reply,note; system event messages are opt-in.
Example:
"reply,note"
Chronological direction. Defaults to asc, so a thread reads oldest-first. A cursor is only valid for the direction it was issued with.
Available options:
asc, desc Example:
"asc"
