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 decides which repositories are cloned.

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, except for pull_request.synchronize, which waits 180 seconds.

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>
default:delete_when_done

Lifecycle policy for workspaces created by this automation. Defaults to delete_when_done, or default when workspace_auto_stop_minutes is set.

Available options:
default,
archive_when_done,
sleep_when_done,
delete_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:auto

Compute size for every workspace this automation fires off. small (2 vCPU, 8 GB memory), large (4 vCPU, 16 GB memory), ultra (8 vCPU, 32 GB memory), or auto (starts small and resizes with load); see Billing for per-size rates. Defaults to auto.

Available options:
small,
large,
ultra,
auto
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,
gemini,
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
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.

credential_user_id
string<uuid> | null

Organization automations only: run on this member's coding agent credentials before the organization's. Only your own user ID, or the member whose credentials the calling workspace runs on.

Response

Automation created successfully

Response containing a single automation

automation
object
required

An automation record