Read my conversation
curl --request GET \
--url https://api.example.com/v1/conversation/messages \
--cookie __Secure-better-auth.session_token=import requests
url = "https://api.example.com/v1/conversation/messages"
headers = {"cookie": "__Secure-better-auth.session_token="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: '__Secure-better-auth.session_token='}};
fetch('https://api.example.com/v1/conversation/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.example.com/v1/conversation/messages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_COOKIE => "__Secure-better-auth.session_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.example.com/v1/conversation/messages"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "__Secure-better-auth.session_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.example.com/v1/conversation/messages")
.header("cookie", "__Secure-better-auth.session_token=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/conversation/messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["cookie"] = '__Secure-better-auth.session_token='
response = http.request(request)
puts response.read_body{
"messages": [
{
"id": "<string>",
"channel": "whatsapp",
"role": "user",
"text": "<string>",
"at": "2023-11-07T05:31:56Z",
"links": [
{
"label": "<string>",
"href": "<string>"
}
],
"capture": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"occurrenceIds": [
"<string>"
]
},
"actions": [
{
"questionId": "<string>",
"optionId": "<string>",
"label": "<string>"
}
]
}
],
"openTurns": [
{
"turnId": "<string>",
"waitMs": 123
}
],
"next": "<string>"
}{
"code": "<string>",
"details": {}
}{
"message": "Unauthorized",
"statusCode": 401
}{
"code": "<string>",
"details": {}
}{
"code": "request.timeout",
"correlationId": "<string>"
}{
"code": "request.timeout",
"correlationId": "<string>"
}Conversation
Read my conversation
The caller’s one conversation with the assistant, on every channel: the newest 50 messages before cursor, oldest first. next is the cursor to the older page, absent when there is none. A reply that read the week links to it. openTurns names the caller’s web messages still waiting for their reply (each turnId is the one the send returned), whichever page they are on, with waitMs: how much longer from this response the reply may still arrive. A turn whose reply did not come within that window is not listed.
GET
/
v1
/
conversation
/
messages
Read my conversation
curl --request GET \
--url https://api.example.com/v1/conversation/messages \
--cookie __Secure-better-auth.session_token=import requests
url = "https://api.example.com/v1/conversation/messages"
headers = {"cookie": "__Secure-better-auth.session_token="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: '__Secure-better-auth.session_token='}};
fetch('https://api.example.com/v1/conversation/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.example.com/v1/conversation/messages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_COOKIE => "__Secure-better-auth.session_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.example.com/v1/conversation/messages"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "__Secure-better-auth.session_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.example.com/v1/conversation/messages")
.header("cookie", "__Secure-better-auth.session_token=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/conversation/messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["cookie"] = '__Secure-better-auth.session_token='
response = http.request(request)
puts response.read_body{
"messages": [
{
"id": "<string>",
"channel": "whatsapp",
"role": "user",
"text": "<string>",
"at": "2023-11-07T05:31:56Z",
"links": [
{
"label": "<string>",
"href": "<string>"
}
],
"capture": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"occurrenceIds": [
"<string>"
]
},
"actions": [
{
"questionId": "<string>",
"optionId": "<string>",
"label": "<string>"
}
]
}
],
"openTurns": [
{
"turnId": "<string>",
"waitMs": 123
}
],
"next": "<string>"
}{
"code": "<string>",
"details": {}
}{
"message": "Unauthorized",
"statusCode": 401
}{
"code": "<string>",
"details": {}
}{
"code": "request.timeout",
"correlationId": "<string>"
}{
"code": "request.timeout",
"correlationId": "<string>"
}Authorizations
sessiontoken
The session cookie set when you sign in to the web app.
Query Parameters
Required string length:
1 - 200