Update an automation
Replaces the fields sent and leaves the rest as they are, then makes the result the live version. Each field is replaced whole: sending steps replaces every step, and sending triggers replaces every trigger, including relationship watches set in the app. A paused automation stays paused. A request that changes nothing returns the automation as it is.
Requires an API key whose user is a workspace owner or admin. Returns 422 when triggers is empty or the workspace cannot choose the requested model; omit model or send auto. Returns 409 when the automation was changed while the request ran.
Required scope: automations:update
Rate limit category: Write
Body ParametersJSONExpand Collapse
model: optional "auto" or "auto_low" or "auto_high" or 4 moreModel the agent steps run on. Returns 400 for an unsupported model and 422 when the workspace cannot choose the requested model; omit model or send auto.
Model the agent steps run on. Returns 400 for an unsupported model and 422 when the workspace cannot choose the requested model; omit model or send auto.
runAs: optional object { type } or object { memberId, type } Who the automation acts as. Workspace admins may name only themselves, a member, or WORKSPACE; only a workspace owner may name another admin or an owner.
Who the automation acts as. Workspace admins may name only themselves, a member, or WORKSPACE; only a workspace owner may name another admin or an owner.
steps: optional array of object { name, prompt, type, permissions } or object { command, name, type, 2 more } or object { duration, name, type, unit } What a run does, in order.
What a run does, in order.
AgentStep object { name, prompt, type, permissions }
permissions: optional array of object { name, type, reason } or object { connector, tools, type, reason } or object { scopes, type, reason } or object { domain, type, headers, 2 more } What the agent may use in this step. Defaults to none.
What the agent may use in this step. Defaults to none.
APIPermission object { scopes, type, reason }
NetworkPermission object { domain, type, headers, 2 more }
CodeStep object { command, name, type, 2 more }
permissions: optional array of object { scopes, type, reason } or object { domain, type, headers, 2 more } What the command may use. Defaults to none.
What the command may use. Defaults to none.
APIPermission object { scopes, type, reason }
NetworkPermission object { domain, type, headers, 2 more }
triggers: optional array of object { type } or object { type, exampleResult } or object { schedule, type } or 3 moreWhat starts a run.
What starts a run.
WebhookTrigger object { type, exampleResult }
exampleResult: optional object { json, parsed } A sample payload and the fields the steps read from it.
A sample payload and the fields the steps read from it.
json: map[string or number or boolean or 2 more] or array of string or number or boolean or 2 more
RecordUpdatedTrigger object { objectType, type, watchedFields, watchedRelationships }
Fields whose changes start a run, as field keys ($name for a built-in field, the slug for a custom one) or attribute definition IDs. With no field or relationship watches, runs on any change.
ReturnsExpand Collapse
AutomationUpdateResponse object { id, createdAt, description, 10 more }
When its most recent failed run ended, test runs included; null if no run has failed.
runAs: object { type } or object { memberId, type } or object { type } Who the automation acts as.
Who the automation acts as.
steps: array of object { id, name, prompt, 2 more } or object { id, command, name, 3 more } or object { id, duration, name, 2 more }
AgentStep object { id, name, prompt, 2 more }
permissions: optional array of object { name, type, reason } or object { connector, tools, type, reason } or object { scopes, type, reason } or object { domain, type, headers, 2 more } What the agent may use in this step. Defaults to none.
What the agent may use in this step. Defaults to none.
APIPermission object { scopes, type, reason }
NetworkPermission object { domain, type, headers, 2 more }
CodeStep object { id, command, name, 3 more }
permissions: optional array of object { scopes, type, reason } or object { domain, type, headers, 2 more } What the command may use. Defaults to none.
What the command may use. Defaults to none.
APIPermission object { scopes, type, reason }
NetworkPermission object { domain, type, headers, 2 more }
triggers: array of object { type } or object { type, url, exampleResult } or object { schedule, type } or 3 more
WebhookTrigger object { type, url, exampleResult }
exampleResult: optional object { json, parsed } A sample payload and the fields the steps read from it.
A sample payload and the fields the steps read from it.
json: map[string or number or boolean or 2 more] or array of string or number or boolean or 2 more
Update an automation
curl https://api.lightfield.app/v1/automations/$ID \
-H 'Content-Type: application/json' \
-H 'Lightfield-Version: 2026-03-01' \
-H "Authorization: Bearer $API_KEY" \
-d '{}'{
"id": "id",
"createdAt": "createdAt",
"description": "description",
"lastFailureAt": "lastFailureAt",
"lastRunAt": "lastRunAt",
"model": "model",
"name": "x",
"objectType": "automation",
"runAs": {
"type": "WORKSPACE"
},
"status": "ACTIVE",
"steps": [
{
"id": "id",
"name": "x",
"prompt": "x",
"type": "AGENT",
"permissions": [
{
"name": "x",
"type": "TOOL",
"reason": "reason"
}
]
}
],
"triggers": [
{
"type": "MANUAL"
}
],
"updatedAt": "updatedAt"
}Returns Examples
{
"id": "id",
"createdAt": "createdAt",
"description": "description",
"lastFailureAt": "lastFailureAt",
"lastRunAt": "lastRunAt",
"model": "model",
"name": "x",
"objectType": "automation",
"runAs": {
"type": "WORKSPACE"
},
"status": "ACTIVE",
"steps": [
{
"id": "id",
"name": "x",
"prompt": "x",
"type": "AGENT",
"permissions": [
{
"name": "x",
"type": "TOOL",
"reason": "reason"
}
]
}
],
"triggers": [
{
"type": "MANUAL"
}
],
"updatedAt": "updatedAt"
}