Skip to main content
GET
/
v1
/
replica
/
{id}
/
history
Read History
curl --request GET \
  --url https://api.tryreplicas.com/v1/replica/{id}/history \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.tryreplicas.com/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.tryreplicas.com/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.tryreplicas.com/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.tryreplicas.com/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.tryreplicas.com/v1/replica/{id}/history")
  .header("Authorization", "Bearer <token>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.tryreplicas.com/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": "<string>",
  "events": [
    {
      "timestamp": "2023-11-07T05:31:56Z",
      "type": "<string>",
      "payload": {
        "timestamp": "2023-11-07T05:31:56Z",
        "payload": {
          "type": "<string>",
          "subtype": "<string>",
          "parent_tool_use_id": "<string>",
          "message": {
            "content": [
              {
                "type": "<string>",
                "text": "<string>"
              }
            ]
          },
          "is_error": true,
          "errors": [
            "<string>"
          ]
        }
      }
    }
  ],
  "total": 123,
  "has_more": true,
  "waking": true,
  "codexAspTranscript": {},
  "senders": [
    {
      "senderUserId": "<string>",
      "senderEmail": "<string>",
      "recordedAt": "2023-11-07T05:31:56Z"
    }
  ]
}
{
  "error": "<string>",
  "details": "<string>"
}
{
  "error": "<string>",
  "details": "<string>"
}
{
  "error": "<string>",
  "details": "<string>"
}
{
  "error": "<string>",
  "details": "<string>"
}
{
  "error": "<string>",
  "details": "<string>"
}

Authorizations

Authorization
string
header
required

API key authentication. Obtain your API key from the Replicas dashboard under Preferences → Organization → Settings → API Keys.

Path Parameters

id
string<uuid>
required

The unique identifier of the replica

Query Parameters

chat_id
string

Filter history to a specific chat

limit
integer

Maximum number of events to return

Required range: x >= 1
offset
integer
default:0

Number of events to skip from the end

Required range: x >= 0

Response

Successful response

Response containing paginated conversation history

thread_id
string | null
required

Thread/session ID

events
object[]
required

History events (paginated from the end)

total
integer
required

Total number of events

has_more
boolean
required

Whether there are more events available

coding_agent
enum<string> | null

Currently active coding agent

Available options:
claude,
codex,
cursor,
opencode,
null
waking
boolean | null

Whether the workspace was just woken from a sleeping or archived state. Retry in 30-90 seconds.

codexAspTranscript
object | null

Native Codex ASP transcript when available

senders
object[]

Sender attribution records for user messages in this chat. In team workspaces, each sendMessage call records the authenticated user; clients can use this to label messages with the actual sender's name instead of "You".