Skip to main content
PATCH
/
v1
/
automations
/
{id}
Update Automation
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,
  "environment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "enabled": true,
  "workspace_auto_stop_minutes": 721,
  "config": {
    "capabilities": {
      "pr_followups": true
    },
    "preferences": {
      "keep_open_on_pr_merge": false
    }
  },
  "model": "<string>",
  "plan_mode": true,
  "goal_mode": true,
  "fast_mode": true
}
'
{
  "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,
    "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
      },
      "preferences": {
        "keep_open_on_pr_merge": false
      }
    },
    "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"
  }
}

Authorizations

Authorization
string
header
required

API key authentication. Obtain your API key from the Replicas dashboard under Settings > API Keys.

Path Parameters

id
string<uuid>
required

The unique identifier of the automation

Body

application/json

Request body for updating an automation. Only provided fields are updated.

name
string

New name

description
string

New description

triggers
object[]

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).

prompt
string

New prompt

debounce_seconds
integer | null

Set or clear the per-automation debounce window in seconds. When greater than 0, bursty trigger events update one pending run for this automation and the latest payload runs after the automation stops receiving events for this many seconds. Null or 0 disables debouncing.

Required range: 0 <= x <= 86400
environment_id
string<uuid>

Move this automation to a different environment.

enabled
boolean

Enable or disable the automation

workspace_lifecycle_policy
enum<string>

New lifecycle policy

Available options:
default,
delete_when_done,
delete_after_inactivity
workspace_auto_stop_minutes
integer | null

New inactivity timeout in minutes (set to null to clear)

Required range: 3 <= x <= 1440
workspace_size
enum<string>

New 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.

Available options:
small,
large
config
object

Workspace behavior configuration. Missing capabilities and preferences default to disabled.

agent_provider
enum<string> | null

New coding agent override. Null inherits the organization default.

Available options:
claude,
codex,
cursor,
opencode,
null
model
string | null

New model override. Requires agent_provider when set.

thinking_level
enum<string> | null

New thinking/reasoning level override.

Available options:
low,
medium,
high,
max,
null
plan_mode
boolean

Enable or disable plan mode for automation messages.

goal_mode
boolean

Enable or disable Codex goal mode for automation messages.

fast_mode
boolean

Enable or disable fast mode for automation messages.

Response

Automation updated successfully

Response containing a single automation

automation
object
required

An automation record