Create Automation
Creates a new automation in your organization. The automation is bound to a single environment, which determines the repository (or repository set) and resolved env vars / MCPs / skills used when the automation fires.
Authorizations
API key authentication. Obtain your API key from the Replicas dashboard under Settings > API Keys.
Body
Request body for creating a new automation. The automation runs in a single environment specified by environment_id.
Human-readable name for the automation
One or more 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).
1The instruction sent to the coding agent when the automation fires
ID of the environment this automation runs in. Required. The environment supplies the repository (or repository set) and resolved env vars / MCPs / skills.
Optional description
Automation scope. org (default) creates an org-owned automation visible to all members. user creates a personal automation scoped to the authenticated user.
org, user Optional 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.
0 <= x <= 86400Whether the automation should be active (defaults to true)
Lifecycle policy for workspaces created by this automation
default, delete_when_done, delete_after_inactivity Inactivity timeout in minutes (requires delete_after_inactivity policy)
3 <= x <= 1440Compute 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. Defaults to small.
small, large Workspace behavior configuration. Missing capabilities and preferences default to disabled.
Coding agent override. Null inherits the organization default.
claude, codex, cursor, opencode, null Model override. Requires agent_provider when set.
Thinking/reasoning level override.
low, medium, high, max, null Run automation messages in plan mode.
Set automation messages as Codex goals. Only applies when the resolved agent is Codex.
Run automation messages in fast mode.
Response
Automation created successfully
Response containing a single automation
An automation record