Skip to main content
POST
Create automation

Authorizations

Authorization
string
header
required

Organization or personal API key from Settings → API Keys.

Headers

X-Replicas-Api-Version
enum<string>

API version. 2026-10-07 returns snake_case responses. See versioning.

Available options:
2026-10-07

Body

application/json

Request body for creating a new automation. The automation runs in a single environment specified by environment_id.

name
string
required

Human-readable name for the automation

triggers
object[]
required

At most one cron trigger and one trigger per event.

Minimum array length: 1
prompt
string
required

The instruction sent to the coding agent when the automation fires

environment_id
string<uuid>
required

ID of the environment this automation runs in. Required. The environment supplies resolved env vars / MCPs / skills and may optionally bind a repository or repository set.

description
string

Optional description

scope
enum<string>
default:org

Automation scope. org (default) creates an org-owned automation visible to all members. user creates a personal automation scoped to the authenticated user.

Available options:
org,
user
debounce_seconds
integer | null

Seconds to wait for trigger events to stop before running once with the latest payload. GitHub and GitLab events debounce per pull or merge request. null or 0 disables debouncing.

Required range: 0 <= x <= 86400
github_check_names
string[]

GitHub check names the automation reports a verdict on. Each starts as an in-progress check on the pull request, so required checks wait for the agent. Requires a pull_request.opened or pull_request.synchronize trigger.

Maximum array length: 10
Maximum string length: 100
enabled
boolean
default:true

Whether the automation should be active (defaults to true)

workspace_lifecycle_policy
enum<string>

Lifecycle policy for workspaces created by this automation

Available options:
default,
archive_when_done,
sleep_when_done
workspace_auto_stop_minutes
integer

Inactivity timeout in minutes for the default keep-alive policy

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

Compute size for every workspace this automation fires off. small (2 vCPU, 8 GB memory) bills at $0.008/min, large (4 vCPU, 16 GB memory) at $0.016/min, and ultra (8 vCPU, 32 GB memory) at $0.032/min. Defaults to small.

Available options:
small,
large,
ultra
config
object

Workspace behavior configuration. Defaults depend on the workspace source; see each setting.

agent_provider
enum<string> | null

Coding agent override. Null inherits the organization default.

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

Model override. Requires agent_provider when set. Must be a model your organization allows for that agent; hidden models are rejected with 400.

thinking_level
enum<string> | null

Thinking/reasoning level override. ultra is available for Codex and Muse Code; ultracode is Claude Code-only.

Available options:
low,
medium,
high,
xhigh,
max,
ultra,
ultracode,
null
plan_mode
boolean

Run automation messages in plan mode.

goal_mode
boolean | null

Set automation messages as goals. Null inherits the resolved agent default; false explicitly disables it. Only applies when the resolved agent is Claude Code or Codex.

fast_mode
boolean | null

Run automation messages in fast mode. Null inherits the resolved agent default; false explicitly disables it.

Response

Automation created successfully

Response containing a single automation

automation
object
required

An automation record