curl --request PATCH \
--url https://api.tryreplicas.com/v1/automations/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"triggers": [
{
"config": {
"schedule": "0 9 * * 1-5",
"timezone": "America/New_York"
}
}
],
"prompt": "<string>",
"debounce_seconds": 43200,
"github_check_names": [
"<string>"
],
"environment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"enabled": true,
"workspace_auto_stop_minutes": 721,
"config": {
"capabilities": {
"pr_followups": true,
"read_only_contents": true
},
"preferences": {
"keep_open_on_pr_merge": false,
"keep_open_on_pr_close": false
},
"provisioning_error": {
"message": "<string>"
}
},
"model": "<string>",
"plan_mode": true,
"goal_mode": true,
"fast_mode": true
}
'import requests
url = "https://api.tryreplicas.com/v1/automations/{id}"
payload = {
"name": "<string>",
"description": "<string>",
"triggers": [{ "config": {
"schedule": "0 9 * * 1-5",
"timezone": "America/New_York"
} }],
"prompt": "<string>",
"debounce_seconds": 43200,
"github_check_names": ["<string>"],
"environment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"enabled": True,
"workspace_auto_stop_minutes": 721,
"config": {
"capabilities": {
"pr_followups": True,
"read_only_contents": True
},
"preferences": {
"keep_open_on_pr_merge": False,
"keep_open_on_pr_close": False
},
"provisioning_error": { "message": "<string>" }
},
"model": "<string>",
"plan_mode": True,
"goal_mode": True,
"fast_mode": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
triggers: [{config: {schedule: '0 9 * * 1-5', timezone: 'America/New_York'}}],
prompt: '<string>',
debounce_seconds: 43200,
github_check_names: ['<string>'],
environment_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
enabled: true,
workspace_auto_stop_minutes: 721,
config: {
capabilities: {pr_followups: true, read_only_contents: true},
preferences: {keep_open_on_pr_merge: false, keep_open_on_pr_close: false},
provisioning_error: {message: '<string>'}
},
model: '<string>',
plan_mode: true,
goal_mode: true,
fast_mode: true
})
};
fetch('https://api.tryreplicas.com/v1/automations/{id}', 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/automations/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'triggers' => [
[
'config' => [
'schedule' => '0 9 * * 1-5',
'timezone' => 'America/New_York'
]
]
],
'prompt' => '<string>',
'debounce_seconds' => 43200,
'github_check_names' => [
'<string>'
],
'environment_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'enabled' => true,
'workspace_auto_stop_minutes' => 721,
'config' => [
'capabilities' => [
'pr_followups' => true,
'read_only_contents' => true
],
'preferences' => [
'keep_open_on_pr_merge' => false,
'keep_open_on_pr_close' => false
],
'provisioning_error' => [
'message' => '<string>'
]
],
'model' => '<string>',
'plan_mode' => true,
'goal_mode' => true,
'fast_mode' => 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.tryreplicas.com/v1/automations/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"triggers\": [\n {\n \"config\": {\n \"schedule\": \"0 9 * * 1-5\",\n \"timezone\": \"America/New_York\"\n }\n }\n ],\n \"prompt\": \"<string>\",\n \"debounce_seconds\": 43200,\n \"github_check_names\": [\n \"<string>\"\n ],\n \"environment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"enabled\": true,\n \"workspace_auto_stop_minutes\": 721,\n \"config\": {\n \"capabilities\": {\n \"pr_followups\": true,\n \"read_only_contents\": true\n },\n \"preferences\": {\n \"keep_open_on_pr_merge\": false,\n \"keep_open_on_pr_close\": false\n },\n \"provisioning_error\": {\n \"message\": \"<string>\"\n }\n },\n \"model\": \"<string>\",\n \"plan_mode\": true,\n \"goal_mode\": true,\n \"fast_mode\": true\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.tryreplicas.com/v1/automations/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"triggers\": [\n {\n \"config\": {\n \"schedule\": \"0 9 * * 1-5\",\n \"timezone\": \"America/New_York\"\n }\n }\n ],\n \"prompt\": \"<string>\",\n \"debounce_seconds\": 43200,\n \"github_check_names\": [\n \"<string>\"\n ],\n \"environment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"enabled\": true,\n \"workspace_auto_stop_minutes\": 721,\n \"config\": {\n \"capabilities\": {\n \"pr_followups\": true,\n \"read_only_contents\": true\n },\n \"preferences\": {\n \"keep_open_on_pr_merge\": false,\n \"keep_open_on_pr_close\": false\n },\n \"provisioning_error\": {\n \"message\": \"<string>\"\n }\n },\n \"model\": \"<string>\",\n \"plan_mode\": true,\n \"goal_mode\": true,\n \"fast_mode\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tryreplicas.com/v1/automations/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"triggers\": [\n {\n \"config\": {\n \"schedule\": \"0 9 * * 1-5\",\n \"timezone\": \"America/New_York\"\n }\n }\n ],\n \"prompt\": \"<string>\",\n \"debounce_seconds\": 43200,\n \"github_check_names\": [\n \"<string>\"\n ],\n \"environment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"enabled\": true,\n \"workspace_auto_stop_minutes\": 721,\n \"config\": {\n \"capabilities\": {\n \"pr_followups\": true,\n \"read_only_contents\": true\n },\n \"preferences\": {\n \"keep_open_on_pr_merge\": false,\n \"keep_open_on_pr_close\": false\n },\n \"provisioning_error\": {\n \"message\": \"<string>\"\n }\n },\n \"model\": \"<string>\",\n \"plan_mode\": true,\n \"goal_mode\": true,\n \"fast_mode\": true\n}"
response = http.request(request)
puts response.read_body{
"automation": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"triggers": [
{
"config": {
"schedule": "0 9 * * 1-5",
"timezone": "America/New_York"
}
}
],
"prompt": "<string>",
"debounce_seconds": 43200,
"github_check_names": [
"<string>"
],
"environment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"enabled": true,
"webhook_token": "<string>",
"cron_expression": "<string>",
"cron_timezone": "<string>",
"cron_next_fire_at": "2023-11-07T05:31:56Z",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspace_auto_stop_minutes": 721,
"config": {
"capabilities": {
"pr_followups": true,
"read_only_contents": true
},
"preferences": {
"keep_open_on_pr_merge": false,
"keep_open_on_pr_close": false
},
"provisioning_error": {
"message": "<string>"
}
},
"model": "<string>",
"plan_mode": true,
"goal_mode": true,
"fast_mode": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"details": "<string>"
}{
"error": "<string>",
"details": "<string>"
}{
"error": "<string>",
"details": "<string>"
}{
"error": "<string>",
"details": "<string>"
}Update Automation
Updates an existing automation. Only the fields provided in the request body will be updated.
curl --request PATCH \
--url https://api.tryreplicas.com/v1/automations/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"triggers": [
{
"config": {
"schedule": "0 9 * * 1-5",
"timezone": "America/New_York"
}
}
],
"prompt": "<string>",
"debounce_seconds": 43200,
"github_check_names": [
"<string>"
],
"environment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"enabled": true,
"workspace_auto_stop_minutes": 721,
"config": {
"capabilities": {
"pr_followups": true,
"read_only_contents": true
},
"preferences": {
"keep_open_on_pr_merge": false,
"keep_open_on_pr_close": false
},
"provisioning_error": {
"message": "<string>"
}
},
"model": "<string>",
"plan_mode": true,
"goal_mode": true,
"fast_mode": true
}
'import requests
url = "https://api.tryreplicas.com/v1/automations/{id}"
payload = {
"name": "<string>",
"description": "<string>",
"triggers": [{ "config": {
"schedule": "0 9 * * 1-5",
"timezone": "America/New_York"
} }],
"prompt": "<string>",
"debounce_seconds": 43200,
"github_check_names": ["<string>"],
"environment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"enabled": True,
"workspace_auto_stop_minutes": 721,
"config": {
"capabilities": {
"pr_followups": True,
"read_only_contents": True
},
"preferences": {
"keep_open_on_pr_merge": False,
"keep_open_on_pr_close": False
},
"provisioning_error": { "message": "<string>" }
},
"model": "<string>",
"plan_mode": True,
"goal_mode": True,
"fast_mode": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
triggers: [{config: {schedule: '0 9 * * 1-5', timezone: 'America/New_York'}}],
prompt: '<string>',
debounce_seconds: 43200,
github_check_names: ['<string>'],
environment_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
enabled: true,
workspace_auto_stop_minutes: 721,
config: {
capabilities: {pr_followups: true, read_only_contents: true},
preferences: {keep_open_on_pr_merge: false, keep_open_on_pr_close: false},
provisioning_error: {message: '<string>'}
},
model: '<string>',
plan_mode: true,
goal_mode: true,
fast_mode: true
})
};
fetch('https://api.tryreplicas.com/v1/automations/{id}', 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/automations/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'triggers' => [
[
'config' => [
'schedule' => '0 9 * * 1-5',
'timezone' => 'America/New_York'
]
]
],
'prompt' => '<string>',
'debounce_seconds' => 43200,
'github_check_names' => [
'<string>'
],
'environment_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'enabled' => true,
'workspace_auto_stop_minutes' => 721,
'config' => [
'capabilities' => [
'pr_followups' => true,
'read_only_contents' => true
],
'preferences' => [
'keep_open_on_pr_merge' => false,
'keep_open_on_pr_close' => false
],
'provisioning_error' => [
'message' => '<string>'
]
],
'model' => '<string>',
'plan_mode' => true,
'goal_mode' => true,
'fast_mode' => 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.tryreplicas.com/v1/automations/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"triggers\": [\n {\n \"config\": {\n \"schedule\": \"0 9 * * 1-5\",\n \"timezone\": \"America/New_York\"\n }\n }\n ],\n \"prompt\": \"<string>\",\n \"debounce_seconds\": 43200,\n \"github_check_names\": [\n \"<string>\"\n ],\n \"environment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"enabled\": true,\n \"workspace_auto_stop_minutes\": 721,\n \"config\": {\n \"capabilities\": {\n \"pr_followups\": true,\n \"read_only_contents\": true\n },\n \"preferences\": {\n \"keep_open_on_pr_merge\": false,\n \"keep_open_on_pr_close\": false\n },\n \"provisioning_error\": {\n \"message\": \"<string>\"\n }\n },\n \"model\": \"<string>\",\n \"plan_mode\": true,\n \"goal_mode\": true,\n \"fast_mode\": true\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.tryreplicas.com/v1/automations/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"triggers\": [\n {\n \"config\": {\n \"schedule\": \"0 9 * * 1-5\",\n \"timezone\": \"America/New_York\"\n }\n }\n ],\n \"prompt\": \"<string>\",\n \"debounce_seconds\": 43200,\n \"github_check_names\": [\n \"<string>\"\n ],\n \"environment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"enabled\": true,\n \"workspace_auto_stop_minutes\": 721,\n \"config\": {\n \"capabilities\": {\n \"pr_followups\": true,\n \"read_only_contents\": true\n },\n \"preferences\": {\n \"keep_open_on_pr_merge\": false,\n \"keep_open_on_pr_close\": false\n },\n \"provisioning_error\": {\n \"message\": \"<string>\"\n }\n },\n \"model\": \"<string>\",\n \"plan_mode\": true,\n \"goal_mode\": true,\n \"fast_mode\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tryreplicas.com/v1/automations/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"triggers\": [\n {\n \"config\": {\n \"schedule\": \"0 9 * * 1-5\",\n \"timezone\": \"America/New_York\"\n }\n }\n ],\n \"prompt\": \"<string>\",\n \"debounce_seconds\": 43200,\n \"github_check_names\": [\n \"<string>\"\n ],\n \"environment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"enabled\": true,\n \"workspace_auto_stop_minutes\": 721,\n \"config\": {\n \"capabilities\": {\n \"pr_followups\": true,\n \"read_only_contents\": true\n },\n \"preferences\": {\n \"keep_open_on_pr_merge\": false,\n \"keep_open_on_pr_close\": false\n },\n \"provisioning_error\": {\n \"message\": \"<string>\"\n }\n },\n \"model\": \"<string>\",\n \"plan_mode\": true,\n \"goal_mode\": true,\n \"fast_mode\": true\n}"
response = http.request(request)
puts response.read_body{
"automation": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"triggers": [
{
"config": {
"schedule": "0 9 * * 1-5",
"timezone": "America/New_York"
}
}
],
"prompt": "<string>",
"debounce_seconds": 43200,
"github_check_names": [
"<string>"
],
"environment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"enabled": true,
"webhook_token": "<string>",
"cron_expression": "<string>",
"cron_timezone": "<string>",
"cron_next_fire_at": "2023-11-07T05:31:56Z",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspace_auto_stop_minutes": 721,
"config": {
"capabilities": {
"pr_followups": true,
"read_only_contents": true
},
"preferences": {
"keep_open_on_pr_merge": false,
"keep_open_on_pr_close": false
},
"provisioning_error": {
"message": "<string>"
}
},
"model": "<string>",
"plan_mode": true,
"goal_mode": true,
"fast_mode": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"details": "<string>"
}{
"error": "<string>",
"details": "<string>"
}{
"error": "<string>",
"details": "<string>"
}{
"error": "<string>",
"details": "<string>"
}Authorizations
API key authentication. Obtain your API key from the Replicas dashboard under Organization → Settings → API Keys. User-session JWTs are not accepted by /v1/replica endpoints.
Path Parameters
The unique identifier of the automation
Body
Request body for updating an automation. Only provided fields are updated.
New name
New description
Replace triggers. Duplicates are not allowed: at most one cron trigger, and at most one event-based trigger per event (e.g. two triggers for pull_request.opened is rejected, but pull_request.opened + merge_request.opened is fine).
Show child attributes
Show child attributes
New prompt
Set or clear the per-automation debounce window in seconds. When greater than 0, bursty trigger events update one pending run and the latest payload runs after matching events stop for this many seconds. GitHub and GitLab events keep separate pending runs per repository and pull or merge request. Null or 0 disables debouncing.
0 <= x <= 86400Set or clear the GitHub check names this automation reports its verdict on. A non-empty list requires a pull_request.opened or pull_request.synchronize trigger. Pass an empty array to stop creating checks.
10100Move this automation to a different environment.
Enable or disable the automation
New lifecycle policy
default, archive_when_done, sleep_when_done New inactivity timeout in minutes for the default keep-alive policy (set to null to clear)
3 <= x <= 1440New compute size for every workspace this automation fires off. small (2 vCPU, 8 GB memory, 20 GB disk) bills at $0.008/min; large (4 vCPU, 16 GB memory, 32 GB disk) bills at $0.016/min.
small, large Workspace behavior configuration. Missing capabilities and preferences default to disabled.
Show child attributes
Show child attributes
New coding agent override. Null inherits the organization default.
claude, codex, cursor, opencode, pi, null New model override. Requires agent_provider when set.
New thinking/reasoning level override. ultra is Codex-only; ultracode is Claude Code-only.
low, medium, high, xhigh, max, ultra, ultracode, null Enable or disable plan mode for automation messages.
Enable or disable Codex goal mode for automation messages. Null inherits the resolved agent default; false explicitly disables it.
Enable or disable fast mode for automation messages. Null inherits the resolved agent default; false explicitly disables it.
Response
Automation updated successfully
Response containing a single automation
An automation record
Show child attributes
Show child attributes