v1

latestOpenAPI 3.1.02026-07-22100167210.7 KB
Automation

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.

post/v1/automations

Request body

namestring required

Human-readable name for the automation

descriptionstring

Optional description

scope'org' | 'user'

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

promptstring required

The instruction sent to the coding agent when the automation fires

debounce_secondsinteger nullable

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.

environment_idstring uuid required

ID of the environment this automation runs in. Required. The environment supplies the repository (or repository set) and resolved env vars / MCPs / skills.

enabledboolean

Whether the automation should be active (defaults to true)

workspace_lifecycle_policy'default' | 'archive_when_done' | 'sleep_when_done' | 'delete_after_inactivity'

Lifecycle policy for workspaces created by this automation

workspace_auto_stop_minutesinteger

Inactivity timeout in minutes for default keep-alive and delete_after_inactivity policies

workspace_size'small' | 'large'

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. Defaults to small.

agent_provider'claude' | 'codex' | 'cursor' | 'opencode' | 'pi' | 'null' nullable

Coding agent override. Null inherits the organization default.

modelstring nullable

Model override. Requires agent_provider when set.

thinking_level'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'ultra' | 'ultracode' | 'null' nullable

Thinking/reasoning level override. ultra is Codex-only; ultracode is Claude Code-only.

plan_modeboolean

Run automation messages in plan mode.

goal_modeboolean nullable

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

fast_modeboolean nullable

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

Example request

{
  "triggers": [
    {
      "config": {
        "schedule": "0 9 * * 1-5",
        "timezone": "America/New_York"
      }
    }
  ]
}

Response

Automation created successfully

Example response

{
  "automation": {
    "triggers": [
      {
        "config": {
          "schedule": "0 9 * * 1-5",
          "timezone": "America/New_York"
        }
      }
    ]
  }
}