Get chat's messages
curl --request GET \
--url https://app.withrealm.com/api/external/alpha/chats/{chat_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.withrealm.com/api/external/alpha/chats/{chat_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.withrealm.com/api/external/alpha/chats/{chat_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.withrealm.com/api/external/alpha/chats/{chat_id}"
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))
}require 'uri'
require 'net/http'
url = URI("https://app.withrealm.com/api/external/alpha/chats/{chat_id}")
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<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.withrealm.com/api/external/alpha/chats/{chat_id}",
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;
}{
"data": [
{
"id": "msg_5f6g",
"content": "Summarize our Q3 sales performance.",
"role": "user"
},
{
"id": "msg_7h8i",
"content": "Your Q3 revenue grew 12% quarter over quarter.",
"role": "assistant"
}
],
"first_id": "msg_5f6g",
"last_id": "msg_7h8i",
"has_more": false,
"assistant_id": "agt_1a2b3c"
}{
"error": "<string>",
"details": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Chats
Get chat's messages
Get a stored chat’s messages.
Rate Limits
600 requests per minute.
GET
/
chats
/
{chat_id}
Get chat's messages
curl --request GET \
--url https://app.withrealm.com/api/external/alpha/chats/{chat_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.withrealm.com/api/external/alpha/chats/{chat_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.withrealm.com/api/external/alpha/chats/{chat_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.withrealm.com/api/external/alpha/chats/{chat_id}"
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))
}require 'uri'
require 'net/http'
url = URI("https://app.withrealm.com/api/external/alpha/chats/{chat_id}")
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<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.withrealm.com/api/external/alpha/chats/{chat_id}",
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;
}{
"data": [
{
"id": "msg_5f6g",
"content": "Summarize our Q3 sales performance.",
"role": "user"
},
{
"id": "msg_7h8i",
"content": "Your Q3 revenue grew 12% quarter over quarter.",
"role": "assistant"
}
],
"first_id": "msg_5f6g",
"last_id": "msg_7h8i",
"has_more": false,
"assistant_id": "agt_1a2b3c"
}{
"error": "<string>",
"details": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The unique identifier of the chat to retrieve messages from.
Query Parameters
Controls how citations are handled in the message content. 'link' preserves citations as links, 'remove' strips them out
Available options:
link, remove Response
Success
⌘I

