Read history
curl --request GET \
--url https://api.replicas.dev/v1/replica/{id}/history \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.replicas.dev/v1/replica/{id}/history"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.replicas.dev/v1/replica/{id}/history', 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.replicas.dev/v1/replica/{id}/history",
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.replicas.dev/v1/replica/{id}/history"
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.replicas.dev/v1/replica/{id}/history")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.replicas.dev/v1/replica/{id}/history")
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{
"thread_id": "thread_123",
"events": [],
"eventsStartIndex": 120,
"turnsStartIndex": 0,
"beforeCursor": "{\"mode\":\"range\",\"events\":\"1048576\",\"turns\":\"4096\"}",
"total": 170,
"has_more": true,
"codexAspTranscript": {
"turns": []
},
"senders": []
}{
"error": "<string>",
"details": "<string>",
"code": "<string>"
}{
"error": "<string>",
"details": "<string>",
"code": "<string>"
}{
"error": "<string>",
"details": "<string>",
"code": "<string>"
}{
"error": "<string>",
"details": "<string>",
"code": "<string>"
}{
"error": "<string>",
"details": "<string>",
"code": "<string>"
}Replica
Read history
Reads history from the newest event, 100 events when limit is omitted. To page back, pass the previous before_cursor until it is null. Sleeping and archived replicas return retained history without waking. Returns 409 when a suspended replica has no retained history.
GET
/
v1
/
replica
/
{id}
/
history
Read history
curl --request GET \
--url https://api.replicas.dev/v1/replica/{id}/history \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.replicas.dev/v1/replica/{id}/history"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.replicas.dev/v1/replica/{id}/history', 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.replicas.dev/v1/replica/{id}/history",
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.replicas.dev/v1/replica/{id}/history"
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.replicas.dev/v1/replica/{id}/history")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.replicas.dev/v1/replica/{id}/history")
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{
"thread_id": "thread_123",
"events": [],
"eventsStartIndex": 120,
"turnsStartIndex": 0,
"beforeCursor": "{\"mode\":\"range\",\"events\":\"1048576\",\"turns\":\"4096\"}",
"total": 170,
"has_more": true,
"codexAspTranscript": {
"turns": []
},
"senders": []
}{
"error": "<string>",
"details": "<string>",
"code": "<string>"
}{
"error": "<string>",
"details": "<string>",
"code": "<string>"
}{
"error": "<string>",
"details": "<string>",
"code": "<string>"
}{
"error": "<string>",
"details": "<string>",
"code": "<string>"
}{
"error": "<string>",
"details": "<string>",
"code": "<string>"
}Authorizations
Headers
API version. 2026-10-07 returns snake_case responses. See versioning.
Available options:
2026-10-07 Query Parameters
Exclusive upper bound: return only events with an index below this value. Pass the previous response's eventsStartIndex to fetch the page before it. Indexes are stable as new events append to the end. Only pages an awake replica; a sleeping replica's saved history pages with before_cursor.
Required range:
x >= 0Response
Successful response
Response containing paginated conversation history
⌘I