curl --request POST \
--url https://api.replicas.dev/v1/workspaces/{workspaceId}/chats/{chatId}/fork \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"title": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"clientRequestId": "<string>",
"enableInteractiveTools": true
}
'import requests
url = "https://api.replicas.dev/v1/workspaces/{workspaceId}/chats/{chatId}/fork"
payload = {
"model": "<string>",
"title": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"clientRequestId": "<string>",
"enableInteractiveTools": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: '<string>',
title: '<string>',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
clientRequestId: '<string>',
enableInteractiveTools: true
})
};
fetch('https://api.replicas.dev/v1/workspaces/{workspaceId}/chats/{chatId}/fork', 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/workspaces/{workspaceId}/chats/{chatId}/fork",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => '<string>',
'title' => '<string>',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'clientRequestId' => '<string>',
'enableInteractiveTools' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.replicas.dev/v1/workspaces/{workspaceId}/chats/{chatId}/fork"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"title\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"clientRequestId\": \"<string>\",\n \"enableInteractiveTools\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.replicas.dev/v1/workspaces/{workspaceId}/chats/{chatId}/fork")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"title\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"clientRequestId\": \"<string>\",\n \"enableInteractiveTools\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.replicas.dev/v1/workspaces/{workspaceId}/chats/{chatId}/fork")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"<string>\",\n \"title\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"clientRequestId\": \"<string>\",\n \"enableInteractiveTools\": true\n}"
response = http.request(request)
puts response.read_body{
"chat": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"provider": "claude",
"title": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"processing": true,
"parentChatId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lastMessageText": "<string>",
"fork": {
"source": {
"chatId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"provider": "claude",
"title": "<string>"
},
"trigger": "manual",
"state": "preparing",
"startedAt": "2023-11-07T05:31:56Z",
"reason": "rate_limit",
"error": "<string>",
"completedAt": "2023-11-07T05:31:56Z"
}
}
}{
"error": "<string>",
"details": "<string>",
"code": "<string>"
}{
"error": "<string>",
"details": "<string>",
"code": "<string>"
}{
"error": "<string>",
"details": "<string>",
"code": "<string>"
}{
"error": "<string>",
"details": "<string>",
"code": "<string>"
}Fork Workspace Chat
Continues an existing chat on another coding agent harness in the same workspace. The source chat is left unchanged. Returns as soon as the forked chat exists, with fork.state set to preparing. The sanitized transcript handoff and the first turn run in the background, after which fork.state becomes ready or failed. The workspace must be active.
curl --request POST \
--url https://api.replicas.dev/v1/workspaces/{workspaceId}/chats/{chatId}/fork \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"title": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"clientRequestId": "<string>",
"enableInteractiveTools": true
}
'import requests
url = "https://api.replicas.dev/v1/workspaces/{workspaceId}/chats/{chatId}/fork"
payload = {
"model": "<string>",
"title": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"clientRequestId": "<string>",
"enableInteractiveTools": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: '<string>',
title: '<string>',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
clientRequestId: '<string>',
enableInteractiveTools: true
})
};
fetch('https://api.replicas.dev/v1/workspaces/{workspaceId}/chats/{chatId}/fork', 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/workspaces/{workspaceId}/chats/{chatId}/fork",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => '<string>',
'title' => '<string>',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'clientRequestId' => '<string>',
'enableInteractiveTools' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.replicas.dev/v1/workspaces/{workspaceId}/chats/{chatId}/fork"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"title\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"clientRequestId\": \"<string>\",\n \"enableInteractiveTools\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.replicas.dev/v1/workspaces/{workspaceId}/chats/{chatId}/fork")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"title\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"clientRequestId\": \"<string>\",\n \"enableInteractiveTools\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.replicas.dev/v1/workspaces/{workspaceId}/chats/{chatId}/fork")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"<string>\",\n \"title\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"clientRequestId\": \"<string>\",\n \"enableInteractiveTools\": true\n}"
response = http.request(request)
puts response.read_body{
"chat": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"provider": "claude",
"title": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"processing": true,
"parentChatId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lastMessageText": "<string>",
"fork": {
"source": {
"chatId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"provider": "claude",
"title": "<string>"
},
"trigger": "manual",
"state": "preparing",
"startedAt": "2023-11-07T05:31:56Z",
"reason": "rate_limit",
"error": "<string>",
"completedAt": "2023-11-07T05:31:56Z"
}
}
}{
"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
API key authentication. Obtain your API key from the Replicas dashboard under Organization → Settings → API Keys.
Body
Request body for continuing an existing chat on another coding agent harness
Harness to continue the chat on. It must have credentials connected in the workspace.
claude, codex, cursor, deepseek, fx, kimi, opencode, pi Model for the forked chat. Defaults to the harness default.
Reasoning effort for the forked chat
low, medium, high, xhigh, max, ultra, ultracode Title for the forked chat. Defaults to a title derived from the source chat.
Optional client-generated chat ID.
Opaque client-chosen id echoed back in the chat.created event
Allow the forked chat's first turn to use interactive tools
Response
Forked chat created
Show child attributes
Show child attributes