List messages in a conversation
curl --request GET \
--url https://api.chatsailer.com/v1/conversations/{conversation_id}/messages \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.chatsailer.com/v1/conversations/{conversation_id}/messages"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.chatsailer.com/v1/conversations/{conversation_id}/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://api.chatsailer.com/v1/conversations/{conversation_id}/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://api.chatsailer.com/v1/conversations/{conversation_id}/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://api.chatsailer.com/v1/conversations/{conversation_id}/messages")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chatsailer.com/v1/conversations/{conversation_id}/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": [
{
"conversation_id": "conv_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"created_at": "2023-11-07T05:31:56Z",
"direction": "inbound",
"id": "msg_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"sender": "attendant",
"status": "received",
"type": "question",
"content": "<string>",
"delivered_at": "2023-11-07T05:31:56Z",
"has_media": false,
"inference_run_id": "run_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"object": "message",
"read_at": "2023-11-07T05:31:56Z",
"sender_classification": "human",
"sent_at": "2023-11-07T05:31:56Z"
}
],
"links": {
"next": "<string>"
},
"meta": {
"has_more": true,
"limit": 123
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Conversations
List messages in a conversation
Messages oldest-first.
inference_run_id on an outbound message points at the AI run that produced it — pass its timestamp as since to the trace endpoint to see why the agent said that.
GET
/
v1
/
conversations
/
{conversation_id}
/
messages
List messages in a conversation
curl --request GET \
--url https://api.chatsailer.com/v1/conversations/{conversation_id}/messages \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.chatsailer.com/v1/conversations/{conversation_id}/messages"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.chatsailer.com/v1/conversations/{conversation_id}/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://api.chatsailer.com/v1/conversations/{conversation_id}/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://api.chatsailer.com/v1/conversations/{conversation_id}/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://api.chatsailer.com/v1/conversations/{conversation_id}/messages")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chatsailer.com/v1/conversations/{conversation_id}/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": [
{
"conversation_id": "conv_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"created_at": "2023-11-07T05:31:56Z",
"direction": "inbound",
"id": "msg_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"sender": "attendant",
"status": "received",
"type": "question",
"content": "<string>",
"delivered_at": "2023-11-07T05:31:56Z",
"has_media": false,
"inference_run_id": "run_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"object": "message",
"read_at": "2023-11-07T05:31:56Z",
"sender_classification": "human",
"sent_at": "2023-11-07T05:31:56Z"
}
],
"links": {
"next": "<string>"
},
"meta": {
"has_more": true,
"limit": 123
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Authorizations
A workspace API token. Create one in Settings → API. Send it as Authorization: Bearer sk_live_....
Path Parameters
Unique identifier for a conversation.
Pattern:
^conv_[0-9a-f]{32}$Example:
"conv_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4"
Query Parameters
Items per page (max 200).
Required range:
1 <= x <= 200Opaque cursor from a previous response's links.next.