Skip to main content
POST
Update an automation

Path Parameters

automation_id
string
required

Automation ID

Required string length: 1 - 128

Body

application/json
revision
integer

Current automation revision. If supplied, the update fails when the revision has changed.

Required range: 1 <= x <= 9007199254740991
name
string

New automation name

Required string length: 1 - 256
description
string | null

New description. To clear it, send null for description in a JSON or YAML body on stdin; the --description flag always sends text.

Maximum string length: 2048
agent

Agent to run in each session. Pass an ID to pin the latest version, or pass an object with type "agent", id, and version to pin a specific version.

Required string length: 1 - 256
environment_id
string

Environment ID later runs' sessions use

Required string length: 1 - 256
initial_events
object[]

Initial events for future runs. Supply one text user.message event.

Required array length: 1 element
schedule
object | null

New schedule, with the same rules as on create, or null to remove the schedule. A field left out keeps its value when a schedule is already set; when adding a schedule to an unscheduled automation, supply both expression and timezone. On an active automation the next firing moves to it.

resources
object[]

Resources for later runs' sessions, replacing the whole list. A run already started keeps its own.

Maximum array length: 72
vault_ids
string[]

Vaults for later runs, replacing the whole list.

Maximum array length: 20
Minimum string length: 1
mcp_server_credentials
object[]

Explicit credentials for later runs, replacing the whole list.

Maximum array length: 40
machine_credentials
object[]

Machine credentials for later runs, replacing the whole list.

Maximum array length: 16
custom_tools
enum<string>

What a run's session does when the agent calls a custom tool. refuse (default) tells the agent nobody will answer. wait pauses the session with stop_reason requires_action until your application sends user.custom_tool_result, as in a session you start yourself. Tools that need a person's approval are refused either way.

Available options:
refuse,
wait

Response

Success

id
string
required
Required string length: 1 - 128
type
enum<string>
required
Available options:
automation
name
string
required
Required string length: 1 - 256
description
string | null
required
Maximum string length: 2048
environment_id
string
required
Required string length: 1 - 256
schedule
object | null
required
status
enum<string>
required
Available options:
active,
paused,
archived
pause_reason
string | null
required
revision
integer
required
Required range: 1 <= x <= 9007199254740991
last_run_at
string | null
required
created_at
string
required
updated_at
string
required
archived_at
string | null
required
agent
object
required
initial_events
object[]
required
Required array length: 1 element
resources
object[]
required
Maximum array length: 72
vault_ids
string[]
required
Maximum array length: 20
Minimum string length: 1
mcp_server_credentials
object[]
required
Maximum array length: 40
machine_credentials
object[]
required
Maximum array length: 16
custom_tools
enum<string>
required
Available options:
refuse,
wait
run_count
integer
required
Required range: -9007199254740991 <= x <= 9007199254740991
upcoming_runs_at
string[]
required