curl --request POST \
--url https://api.replicas.dev/v1/replica/{id}/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"message": "<string>",
"chat_id": "<string>",
"model": "<string>",
"images": [
{
"type": "image",
"source": {
"type": "base64",
"data": "<string>"
}
}
],
"plan_mode": true,
"goal_mode": true,
"fast_mode": true,
"senderUserId": "<string>",
"senderEmail": "<string>"
}
'import requests
url = "https://api.replicas.dev/v1/replica/{id}/messages"
payload = {
"message": "<string>",
"chat_id": "<string>",
"model": "<string>",
"images": [
{
"type": "image",
"source": {
"type": "base64",
"data": "<string>"
}
}
],
"plan_mode": True,
"goal_mode": True,
"fast_mode": True,
"senderUserId": "<string>",
"senderEmail": "<string>"
}
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({
message: '<string>',
chat_id: '<string>',
model: '<string>',
images: [{type: 'image', source: {type: 'base64', data: '<string>'}}],
plan_mode: true,
goal_mode: true,
fast_mode: true,
senderUserId: '<string>',
senderEmail: '<string>'
})
};
fetch('https://api.replicas.dev/v1/replica/{id}/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.replicas.dev/v1/replica/{id}/messages",
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([
'message' => '<string>',
'chat_id' => '<string>',
'model' => '<string>',
'images' => [
[
'type' => 'image',
'source' => [
'type' => 'base64',
'data' => '<string>'
]
]
],
'plan_mode' => true,
'goal_mode' => true,
'fast_mode' => true,
'senderUserId' => '<string>',
'senderEmail' => '<string>'
]),
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/replica/{id}/messages"
payload := strings.NewReader("{\n \"message\": \"<string>\",\n \"chat_id\": \"<string>\",\n \"model\": \"<string>\",\n \"images\": [\n {\n \"type\": \"image\",\n \"source\": {\n \"type\": \"base64\",\n \"data\": \"<string>\"\n }\n }\n ],\n \"plan_mode\": true,\n \"goal_mode\": true,\n \"fast_mode\": true,\n \"senderUserId\": \"<string>\",\n \"senderEmail\": \"<string>\"\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/replica/{id}/messages")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"message\": \"<string>\",\n \"chat_id\": \"<string>\",\n \"model\": \"<string>\",\n \"images\": [\n {\n \"type\": \"image\",\n \"source\": {\n \"type\": \"base64\",\n \"data\": \"<string>\"\n }\n }\n ],\n \"plan_mode\": true,\n \"goal_mode\": true,\n \"fast_mode\": true,\n \"senderUserId\": \"<string>\",\n \"senderEmail\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.replicas.dev/v1/replica/{id}/messages")
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 \"message\": \"<string>\",\n \"chat_id\": \"<string>\",\n \"model\": \"<string>\",\n \"images\": [\n {\n \"type\": \"image\",\n \"source\": {\n \"type\": \"base64\",\n \"data\": \"<string>\"\n }\n }\n ],\n \"plan_mode\": true,\n \"goal_mode\": true,\n \"fast_mode\": true,\n \"senderUserId\": \"<string>\",\n \"senderEmail\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "sent",
"message_id": "<string>",
"position": 123,
"chat_id": "<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>"
}{
"error": "<string>",
"details": "<string>",
"code": "<string>"
}{
"error": "<string>",
"details": "<string>",
"code": "<string>"
}{
"error": "<string>",
"details": "<string>",
"code": "<string>"
}Send Message
Sends a message to an existing replica. Sleeping workspaces wake automatically, and archived workspaces are restored automatically before message delivery. Supports targeting a specific chat, choosing a coding agent and model, attaching images, and enabling plan mode.
curl --request POST \
--url https://api.replicas.dev/v1/replica/{id}/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"message": "<string>",
"chat_id": "<string>",
"model": "<string>",
"images": [
{
"type": "image",
"source": {
"type": "base64",
"data": "<string>"
}
}
],
"plan_mode": true,
"goal_mode": true,
"fast_mode": true,
"senderUserId": "<string>",
"senderEmail": "<string>"
}
'import requests
url = "https://api.replicas.dev/v1/replica/{id}/messages"
payload = {
"message": "<string>",
"chat_id": "<string>",
"model": "<string>",
"images": [
{
"type": "image",
"source": {
"type": "base64",
"data": "<string>"
}
}
],
"plan_mode": True,
"goal_mode": True,
"fast_mode": True,
"senderUserId": "<string>",
"senderEmail": "<string>"
}
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({
message: '<string>',
chat_id: '<string>',
model: '<string>',
images: [{type: 'image', source: {type: 'base64', data: '<string>'}}],
plan_mode: true,
goal_mode: true,
fast_mode: true,
senderUserId: '<string>',
senderEmail: '<string>'
})
};
fetch('https://api.replicas.dev/v1/replica/{id}/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.replicas.dev/v1/replica/{id}/messages",
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([
'message' => '<string>',
'chat_id' => '<string>',
'model' => '<string>',
'images' => [
[
'type' => 'image',
'source' => [
'type' => 'base64',
'data' => '<string>'
]
]
],
'plan_mode' => true,
'goal_mode' => true,
'fast_mode' => true,
'senderUserId' => '<string>',
'senderEmail' => '<string>'
]),
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/replica/{id}/messages"
payload := strings.NewReader("{\n \"message\": \"<string>\",\n \"chat_id\": \"<string>\",\n \"model\": \"<string>\",\n \"images\": [\n {\n \"type\": \"image\",\n \"source\": {\n \"type\": \"base64\",\n \"data\": \"<string>\"\n }\n }\n ],\n \"plan_mode\": true,\n \"goal_mode\": true,\n \"fast_mode\": true,\n \"senderUserId\": \"<string>\",\n \"senderEmail\": \"<string>\"\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/replica/{id}/messages")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"message\": \"<string>\",\n \"chat_id\": \"<string>\",\n \"model\": \"<string>\",\n \"images\": [\n {\n \"type\": \"image\",\n \"source\": {\n \"type\": \"base64\",\n \"data\": \"<string>\"\n }\n }\n ],\n \"plan_mode\": true,\n \"goal_mode\": true,\n \"fast_mode\": true,\n \"senderUserId\": \"<string>\",\n \"senderEmail\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.replicas.dev/v1/replica/{id}/messages")
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 \"message\": \"<string>\",\n \"chat_id\": \"<string>\",\n \"model\": \"<string>\",\n \"images\": [\n {\n \"type\": \"image\",\n \"source\": {\n \"type\": \"base64\",\n \"data\": \"<string>\"\n }\n }\n ],\n \"plan_mode\": true,\n \"goal_mode\": true,\n \"fast_mode\": true,\n \"senderUserId\": \"<string>\",\n \"senderEmail\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "sent",
"message_id": "<string>",
"position": 123,
"chat_id": "<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>"
}{
"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.
Path Parameters
The unique identifier of the replica
Body
Request body for sending a message to a replica
Message to send to the coding agent
Coding agent to use
claude, codex, cursor, muse, opencode, pi Target a specific chat session
Model to use for this message. Muse Code accepts muse-spark-1.3 and muse-spark-1.2. With OpenRouter, Pi and Opencode accept models available to the connected OpenRouter account. The OpenRouter models selection in Coding Agents settings controls model-picker visibility only; it does not restrict explicit model requests or saved defaults.
Images to attach to the message
Show child attributes
Show child attributes
Whether to run in plan mode. Leading /plan in the message is also detected and stripped.
Whether to set the message as the active goal (Claude Code and Codex). Leading /goal in the message is also detected and stripped.
Whether to run in fast mode. Leading /fast in the message is also detected and stripped.
Thinking/reasoning level. Controls how much effort the agent puts into reasoning. ultra is available for Codex and Muse Code; ultracode is Claude Code-only. Falls back to provider default when omitted (Claude default: high, Codex default: medium, Cursor default: medium, Muse Code default: high, Opencode default: medium, Pi default: medium).
low, medium, high, xhigh, max, ultra, ultracode Identifier of the user sending this message. When the request is authenticated via dashboard auth, the server overrides this with the authenticated user's id so team workspaces can attribute messages to the actual sender.
Email of the user sending this message. When the request is authenticated via dashboard auth, the server overrides this with the authenticated user's email.
Response
Message accepted
Response after sending a message to a replica
Status of the message delivery
sent, queued, waking Unique identifier for the sent message
Queue position if status is 'queued'
ID of the chat the message was sent to