Manage automations with the API
Create, update, pause, resume and delete automations through the REST API with an owner or admin API key.
Available on Pro, Growth and Enterprise. Earlier plans can differ
Use the Automations API to create and change automations from your own code, and to pause, resume or delete them. An automation runs its steps whenever one of its triggers fires. For what each trigger, step and permission does, and who a run acts as, see Build an automation.
Before you start
Section titled “Before you start”Only an API key can call these endpoints, and the key’s creator must be a workspace owner or admin who still has that role. A workspace key’s creator must also have been an owner or admin when they created it. Otherwise the request returns 403.
Each operation needs one scope. See Scopes.
| Operation | Scope |
|---|---|
| List automations, retrieve one | automations:read |
| Create an automation | automations:create |
| Update, pause or resume an automation | automations:update |
| Delete an automation | automations:delete |
Create an automation
Section titled “Create an automation”An automation you create through the API is live as soon as the request returns, and its triggers can start runs right away. The permissions on its steps are granted by your request: nobody approves them in the app the way they do for an automation built in chat. Check the steps and permissions before you send the request. To try an automation before it runs on its own, give it only a MANUAL trigger, which runs only when started by hand, and add its real triggers with an update once you’re satisfied.
Create an automation needs a name, at least one trigger and at least one step:
curl https://api.lightfield.app/v1/automations \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $LIGHTFIELD_API_KEY" \ -H "Lightfield-Version: 2026-03-01" \ -d '{ "name": "Research new accounts", "description": "Adds a short company summary to each new account", "triggers": [{ "type": "RECORD_CREATED", "objectType": "$account" }], "steps": [ { "type": "AGENT", "name": "Research", "prompt": "Research the company behind the new account and add a note with a two-sentence summary.", "permissions": [ { "type": "TOOL", "name": "web_search", "reason": "Looks up the company" }, { "type": "API", "scopes": ["accounts:read", "notes:create"], "reason": "Reads the account and adds the note" } ] } ], "runAs": { "type": "WORKSPACE" } }'The response is the automation, with status: "ACTIVE". This excerpt leaves out some properties:
{ "id": "aut_cmv1b7k2p0004", "objectType": "automation", "status": "ACTIVE", "name": "Research new accounts", "model": "auto", "runAs": { "type": "WORKSPACE" }, "triggers": [{ "type": "RECORD_CREATED", "objectType": "$account" }], "lastRunAt": null, "lastFailureAt": null}Each step comes back with an id that Lightfield assigns. A WEBHOOK trigger comes back with the url that starts a run; Webhook explains how to call it.
When you build the request:
- Triggers: record triggers take
objectTypeas$account,$contact,$opportunity,$meeting,$taskor$note, or a custom object’s slug.RECORD_CREATEDalso accepts$email. ARECORD_UPDATEDtrigger runs on any change unless you listwatchedFields, such as["$name"]or a custom field’s key. - API permissions: a step can be granted only API scopes your key holds, and only a full-access key can grant
*. Later updates need a key that still holds every scope the automation grants, even to rename it. - Model: leave
modelout or sendautounless your workspace can choose automation models. - Runs as:
runAstakesWORKSPACEor aMEMBERwith amemberIdfrom List members. An admin can name themselves,WORKSPACEor a member who isn’t an owner or admin. Only an owner can name another admin or an owner. See Runs as for what each choice can read.
Read automations
Section titled “Read automations”List automations returns a preview of each automation, newest first: its status, triggerTypes, stepCount, lastRunAt and lastFailureAt. Page through it with limit and offset, as described in Pagination. Retrieve an automation for its steps and trigger details.
curl https://api.lightfield.app/v1/automations/aut_cmv1b7k2p0004 \ -H "Authorization: Bearer $LIGHTFIELD_API_KEY" \ -H "Lightfield-Version: 2026-03-01"Both return only published automations: one that has never been published from the app isn’t listed and returns 404. Retrieve shows the published version; inputs, skills and files set in the app aren’t part of the response. An automation that takes its member from a run’s input shows runAs as FROM_INPUT, which only the app can set.
Update an automation
Section titled “Update an automation”Update an automation replaces the fields you send and leaves the others as they are. The result becomes the published version at once. A paused automation stays paused, and a request that changes nothing returns the automation unchanged.
Each field is replaced whole. Sending steps replaces every step, and sending triggers replaces every trigger, including relationship watches set in the app. To change one step, retrieve the automation, edit its steps, and send the full list back. Remove each step’s id, and the url on a WEBHOOK trigger, before you send them: they’re assigned by Lightfield and aren’t accepted in a request.
curl https://api.lightfield.app/v1/automations/aut_cmv1b7k2p0004 \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $LIGHTFIELD_API_KEY" \ -H "Lightfield-Version: 2026-03-01" \ -d '{ "triggers": [ { "type": "RECORD_CREATED", "objectType": "$account" }, { "type": "SCHEDULED", "schedule": { "cron": "0 9 * * 1-5", "timezone": "America/New_York" } } ] }'An update keeps inputs set in the app, and keeps a FROM_INPUT member unless you send runAs. If someone changes the automation while your request runs, the update returns 409; retrieve it again and resend your change.
Pause, resume or delete
Section titled “Pause, resume or delete”Pause an automation to stop its triggers from starting runs. Resume it to let them start runs again. Both return the automation; one that’s already in the requested state comes back unchanged.
curl https://api.lightfield.app/v1/automations/aut_cmv1b7k2p0004/pause \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $LIGHTFIELD_API_KEY" \ -H "Lightfield-Version: 2026-03-01" \ -d '{}'Check that status is PAUSED, or ACTIVE after a resume. What pausing does to runs already in progress is described in Pause, resume or delete an automation.
Delete an automation turns off its triggers and dismisses the runs it has waiting for review. It can’t be undone, so pause the automation instead if you might want it back.
curl -X DELETE https://api.lightfield.app/v1/automations/aut_cmv1b7k2p0004 \ -H "Authorization: Bearer $LIGHTFIELD_API_KEY" \ -H "Lightfield-Version: 2026-03-01"{ "id": "aut_cmv1b7k2p0004", "objectType": "automation", "deleted": true }Deleting it again returns 404.
When a request is refused
Section titled “When a request is refused”A refused create or update changes nothing. message says what to fix.
| Status | When it happens |
|---|---|
400 | code is invalid_configuration: a record trigger names an object type the workspace doesn’t have, or a step or trigger is invalid. The message lists each problem with its location, such as steps[1]. An unsupported model also returns 400. |
403 | The request didn’t use an API key, the key lacks the scope, its creator isn’t an owner or admin, or the workspace’s plan doesn’t include automations. Also when a step grants an API scope the key doesn’t hold, which the message names, or when runAs names someone your role can’t pick. |
404 | No published automation has that ID in this workspace. |
409 | The automation changed while the update ran. Retrieve it and retry. |
422 | The request is valid JSON but can’t be saved: triggers is empty, the workspace can’t choose the requested model, description or a permission reason is blank, an API scope can’t be granted to automation steps, a tool isn’t available in the workspace, an MCP connector isn’t trimmed and lowercase or its tool names aren’t trimmed and unique, a NETWORK domain has a scheme, query, fragment, uppercase host or surrounding spaces, or a watched relationship doesn’t apply. |
The error format is described in Errors.