# Automation

## Create an automation

**post** `/v1/automations`

> [!WARNING]
This endpoint is in beta and isn't available to every workspace yet. Its parameters and response schemas may change, including breaking changes.

Creates an automation and makes it live at once: its triggers start runs as soon as the request returns. The permissions on its steps are granted by this request; nobody approves them in the app.

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`.

**[Required scope](/using-the-api/scopes/):** `automations:create`

**[Rate limit category](/using-the-api/rate-limits/):** Write

### Body Parameters

- `name: string`

  Display name of the automation.

- `steps: 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.

  - `AgentStep object { name, prompt, type, permissions }`

    - `name: string`

      Display name of the step.

    - `prompt: string`

      Instructions the agent follows in this step.

    - `type: "AGENT"`

      - `"AGENT"`

    - `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.

      - `ToolPermission object { name, type, reason }`

        - `name: string`

          Name of the tool, matching the Lightfield app.

        - `type: "TOOL"`

          - `"TOOL"`

        - `reason: optional string`

          Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

      - `McpPermission object { connector, tools, type, reason }`

        - `connector: string`

          Connector the tools are on. Must already be lowercase and trimmed.

        - `tools: array of string`

          Unique, trimmed names of the connector tools the step may call.

        - `type: "MCP"`

          - `"MCP"`

        - `reason: optional string`

          Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

      - `APIPermission object { scopes, type, reason }`

        - `scopes: array of string`

          Lightfield API scopes the step may use, for example `contacts:read`. The API key must hold every scope it grants, and only a full-access key may grant `*`.

        - `type: "API"`

          - `"API"`

        - `reason: optional string`

          Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

      - `NetworkPermission object { domain, type, headers, 2 more }`

        - `domain: string`

          Lowercase host the step may call, optionally followed by a path glob. Returns 422 for a scheme, query, fragment or surrounding whitespace.

        - `type: "NETWORK"`

          - `"NETWORK"`

        - `headers: optional map[string]`

          Headers added to every request this permission allows.

        - `method: optional "GET" or "POST" or "PUT" or 2 more`

          Restricts the permission to one HTTP method.

          - `"GET"`

          - `"POST"`

          - `"PUT"`

          - `"PATCH"`

          - `"DELETE"`

        - `reason: optional string`

          Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

  - `CodeStep object { command, name, type, 2 more }`

    - `command: string`

      Bash command the step runs as written.

    - `name: string`

      Display name of the step.

    - `type: "CODE"`

      - `"CODE"`

    - `description: optional string`

      What the command does. Does not change what runs.

    - `permissions: optional array of object { scopes, type, reason }  or object { domain, type, headers, 2 more }`

      What the command may use. Defaults to none.

      - `APIPermission object { scopes, type, reason }`

        - `scopes: array of string`

          Lightfield API scopes the step may use, for example `contacts:read`. The API key must hold every scope it grants, and only a full-access key may grant `*`.

        - `type: "API"`

          - `"API"`

        - `reason: optional string`

          Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

      - `NetworkPermission object { domain, type, headers, 2 more }`

        - `domain: string`

          Lowercase host the step may call, optionally followed by a path glob. Returns 422 for a scheme, query, fragment or surrounding whitespace.

        - `type: "NETWORK"`

          - `"NETWORK"`

        - `headers: optional map[string]`

          Headers added to every request this permission allows.

        - `method: optional "GET" or "POST" or "PUT" or 2 more`

          Restricts the permission to one HTTP method.

          - `"GET"`

          - `"POST"`

          - `"PUT"`

          - `"PATCH"`

          - `"DELETE"`

        - `reason: optional string`

          Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

  - `SleepStep object { duration, name, type, unit }`

    - `duration: number or string`

      How long to sleep before the next step, at most one year.

      - `number`

      - `string`

    - `name: string`

      Display name of the step.

    - `type: "SLEEP"`

      - `"SLEEP"`

    - `unit: "MILLISECOND" or "SECOND" or "MINUTE" or 2 more`

      Unit of `duration`.

      - `"MILLISECOND"`

      - `"SECOND"`

      - `"MINUTE"`

      - `"HOUR"`

      - `"DAY"`

- `triggers: array of object { type }  or object { type, exampleResult }  or object { schedule, type }  or 3 more`

  What starts a run.

  - `ManualTrigger object { type }`

    - `type: "MANUAL"`

      - `"MANUAL"`

  - `WebhookTrigger object { type, exampleResult }`

    - `type: "WEBHOOK"`

      - `"WEBHOOK"`

    - `exampleResult: optional object { json, parsed }`

      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`

        - `map[string or number or boolean or 2 more]`

          - `string`

          - `number`

          - `boolean`

          - `array of string or number or boolean or 2 more`

            - `string`

            - `number`

            - `boolean`

            - `array of JsonValue`

              - `string`

              - `number`

              - `boolean`

              - `array of unknown`

              - `unknown`

            - `map[JsonValue]`

              - `string`

              - `number`

              - `boolean`

              - `array of unknown`

              - `unknown`

          - `map[string or number or boolean or 2 more]`

            - `string`

            - `number`

            - `boolean`

            - `array of JsonValue`

              - `string`

              - `number`

              - `boolean`

              - `array of unknown`

              - `unknown`

            - `map[JsonValue]`

              - `string`

              - `number`

              - `boolean`

              - `array of unknown`

              - `unknown`

        - `array of string or number or boolean or 2 more`

          - `string`

          - `number`

          - `boolean`

          - `array of string or number or boolean or 2 more`

            - `string`

            - `number`

            - `boolean`

            - `array of JsonValue`

              - `string`

              - `number`

              - `boolean`

              - `array of unknown`

              - `unknown`

            - `map[JsonValue]`

              - `string`

              - `number`

              - `boolean`

              - `array of unknown`

              - `unknown`

          - `map[string or number or boolean or 2 more]`

            - `string`

            - `number`

            - `boolean`

            - `array of JsonValue`

              - `string`

              - `number`

              - `boolean`

              - `array of unknown`

              - `unknown`

            - `map[JsonValue]`

              - `string`

              - `number`

              - `boolean`

              - `array of unknown`

              - `unknown`

      - `parsed: array of object { path, label, value }`

        - `path: array of string`

        - `label: optional string`

        - `value: optional string or number or boolean or 2 more`

          - `string`

          - `number`

          - `boolean`

          - `array of string or number or boolean or 2 more`

            - `string`

            - `number`

            - `boolean`

            - `array of JsonValue`

              - `string`

              - `number`

              - `boolean`

              - `array of unknown`

              - `unknown`

            - `map[JsonValue]`

              - `string`

              - `number`

              - `boolean`

              - `array of unknown`

              - `unknown`

          - `map[string or number or boolean or 2 more]`

            - `string`

            - `number`

            - `boolean`

            - `array of JsonValue`

              - `string`

              - `number`

              - `boolean`

              - `array of unknown`

              - `unknown`

            - `map[JsonValue]`

              - `string`

              - `number`

              - `boolean`

              - `array of unknown`

              - `unknown`

  - `ScheduledTrigger object { schedule, type }`

    - `schedule: object { cron, timezone }`

      - `cron: string`

        Cron expression: 5 fields, 6 with a leading seconds field, or a macro such as `@daily`. For example `0 9 * * 1-5`.

      - `timezone: string`

        IANA timezone the cron is evaluated in.

    - `type: "SCHEDULED"`

      - `"SCHEDULED"`

  - `RecordCreatedTrigger object { objectType, type }`

    - `objectType: string`

      Record type to watch: `$account`, `$contact`, `$opportunity`, `$meeting`, `$task`, `$note`, `$email`, or the slug of a custom object. The `$` marks a built-in; a bare name is always a custom object slug.

    - `type: "RECORD_CREATED"`

      - `"RECORD_CREATED"`

  - `RecordUpdatedTrigger object { objectType, type, watchedFields, watchedRelationships }`

    - `objectType: string`

    - `type: "RECORD_UPDATED"`

      - `"RECORD_UPDATED"`

    - `watchedFields: optional array of string`

      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.

    - `watchedRelationships: optional array of object { key, direction }`

      Relationships whose additions or removals start a run.

      - `key: string`

        Public relationship key, such as `$contact` or a custom relationship slug.

      - `direction: optional "SOURCE" or "DESTINATION"`

        Optional when the endpoint object types differ. Required for a self-relationship. A contradictory or ambiguous direction returns 422.

        - `"SOURCE"`

        - `"DESTINATION"`

  - `SequenceReplyTrigger object { type }`

    - `type: "SEQUENCE_REPLY"`

      - `"SEQUENCE_REPLY"`

- `description: optional string`

  What the automation is meant to accomplish.

- `model: optional "auto" or "auto_low" or "auto_high" or 4 more`

  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`.

  - `"auto"`

  - `"auto_low"`

  - `"auto_high"`

  - `"sonnet_5_5"`

  - `"haiku_5_5"`

  - `"gpt_6_1_terra"`

  - `"gpt_6_luna"`

- `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.

  - `WorkspaceRunAs object { type }`

    Runs with no acting member.

    - `type: "WORKSPACE"`

      - `"WORKSPACE"`

  - `MemberRunAs object { memberId, type }`

    - `memberId: string`

      Member the automation runs as.

    - `type: "MEMBER"`

      - `"MEMBER"`

### Returns

- `AutomationCreateResponse object { id, createdAt, description, 10 more }`

  - `id: string`

    Unique identifier of the automation.

  - `createdAt: string`

    When the automation was created.

  - `description: string`

    What the automation is meant to accomplish.

  - `lastFailureAt: string`

    When its most recent failed run ended, test runs included; null if no run has failed.

  - `lastRunAt: string`

    When its most recent run started, test runs included; null before the first run.

  - `model: string`

    Model the agent steps run on.

  - `name: string`

    Display name of the automation.

  - `objectType: "automation"`

    Always `automation`.

    - `"automation"`

  - `runAs: object { type }  or object { memberId, type }  or object { type }`

    Who the automation acts as.

    - `WorkspaceRunAs object { type }`

      Runs with no acting member.

      - `type: "WORKSPACE"`

        - `"WORKSPACE"`

    - `MemberRunAs object { memberId, type }`

      - `memberId: string`

        Member the automation runs as.

      - `type: "MEMBER"`

        - `"MEMBER"`

    - `FromInputRunAs object { type }`

      The acting member is read from an input when a run starts. Set in the Lightfield app.

      - `type: "FROM_INPUT"`

        - `"FROM_INPUT"`

  - `status: "ACTIVE" or "PAUSED"`

    `PAUSED` automations keep their triggers but start no runs.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `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 }`

      - `id: string`

        Step identifier. Assigned by Lightfield.

      - `name: string`

        Display name of the step.

      - `prompt: string`

        Instructions the agent follows in this step.

      - `type: "AGENT"`

        - `"AGENT"`

      - `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.

        - `ToolPermission object { name, type, reason }`

          - `name: string`

            Name of the tool, matching the Lightfield app.

          - `type: "TOOL"`

            - `"TOOL"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

        - `McpPermission object { connector, tools, type, reason }`

          - `connector: string`

            Connector the tools are on. Must already be lowercase and trimmed.

          - `tools: array of string`

            Unique, trimmed names of the connector tools the step may call.

          - `type: "MCP"`

            - `"MCP"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

        - `APIPermission object { scopes, type, reason }`

          - `scopes: array of string`

            Lightfield API scopes the step may use, for example `contacts:read`. The API key must hold every scope it grants, and only a full-access key may grant `*`.

          - `type: "API"`

            - `"API"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

        - `NetworkPermission object { domain, type, headers, 2 more }`

          - `domain: string`

            Lowercase host the step may call, optionally followed by a path glob. Returns 422 for a scheme, query, fragment or surrounding whitespace.

          - `type: "NETWORK"`

            - `"NETWORK"`

          - `headers: optional map[string]`

            Headers added to every request this permission allows.

          - `method: optional "GET" or "POST" or "PUT" or 2 more`

            Restricts the permission to one HTTP method.

            - `"GET"`

            - `"POST"`

            - `"PUT"`

            - `"PATCH"`

            - `"DELETE"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

    - `CodeStep object { id, command, name, 3 more }`

      - `id: string`

        Step identifier. Assigned by Lightfield.

      - `command: string`

        Bash command the step runs as written.

      - `name: string`

        Display name of the step.

      - `type: "CODE"`

        - `"CODE"`

      - `description: optional string`

        What the command does. Does not change what runs.

      - `permissions: optional array of object { scopes, type, reason }  or object { domain, type, headers, 2 more }`

        What the command may use. Defaults to none.

        - `APIPermission object { scopes, type, reason }`

          - `scopes: array of string`

            Lightfield API scopes the step may use, for example `contacts:read`. The API key must hold every scope it grants, and only a full-access key may grant `*`.

          - `type: "API"`

            - `"API"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

        - `NetworkPermission object { domain, type, headers, 2 more }`

          - `domain: string`

            Lowercase host the step may call, optionally followed by a path glob. Returns 422 for a scheme, query, fragment or surrounding whitespace.

          - `type: "NETWORK"`

            - `"NETWORK"`

          - `headers: optional map[string]`

            Headers added to every request this permission allows.

          - `method: optional "GET" or "POST" or "PUT" or 2 more`

            Restricts the permission to one HTTP method.

            - `"GET"`

            - `"POST"`

            - `"PUT"`

            - `"PATCH"`

            - `"DELETE"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

    - `SleepStep object { id, duration, name, 2 more }`

      - `id: string`

        Step identifier. Assigned by Lightfield.

      - `duration: number or string`

        How long to sleep before the next step, at most one year.

        - `number`

        - `string`

      - `name: string`

        Display name of the step.

      - `type: "SLEEP"`

        - `"SLEEP"`

      - `unit: "MILLISECOND" or "SECOND" or "MINUTE" or 2 more`

        Unit of `duration`.

        - `"MILLISECOND"`

        - `"SECOND"`

        - `"MINUTE"`

        - `"HOUR"`

        - `"DAY"`

  - `triggers: array of object { type }  or object { type, url, exampleResult }  or object { schedule, type }  or 3 more`

    - `ManualTrigger object { type }`

      - `type: "MANUAL"`

        - `"MANUAL"`

    - `WebhookTrigger object { type, url, exampleResult }`

      - `type: "WEBHOOK"`

        - `"WEBHOOK"`

      - `url: string`

        URL that starts a run when it receives a POST request.

      - `exampleResult: optional object { json, parsed }`

        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`

          - `map[string or number or boolean or 2 more]`

            - `string`

            - `number`

            - `boolean`

            - `array of string or number or boolean or 2 more`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

            - `map[string or number or boolean or 2 more]`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

          - `array of string or number or boolean or 2 more`

            - `string`

            - `number`

            - `boolean`

            - `array of string or number or boolean or 2 more`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

            - `map[string or number or boolean or 2 more]`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

        - `parsed: array of object { path, label, value }`

          - `path: array of string`

          - `label: optional string`

          - `value: optional string or number or boolean or 2 more`

            - `string`

            - `number`

            - `boolean`

            - `array of string or number or boolean or 2 more`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

            - `map[string or number or boolean or 2 more]`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

    - `ScheduledTrigger object { schedule, type }`

      - `schedule: object { cron, timezone }`

        - `cron: string`

          Cron expression: 5 fields, 6 with a leading seconds field, or a macro such as `@daily`. For example `0 9 * * 1-5`.

        - `timezone: string`

          IANA timezone the cron is evaluated in.

      - `type: "SCHEDULED"`

        - `"SCHEDULED"`

    - `RecordCreatedTrigger object { objectType, type }`

      - `objectType: string`

      - `type: "RECORD_CREATED"`

        - `"RECORD_CREATED"`

    - `RecordUpdatedTrigger object { objectType, type, watchedFields, watchedRelationships }`

      - `objectType: string`

      - `type: "RECORD_UPDATED"`

        - `"RECORD_UPDATED"`

      - `watchedFields: array of string`

      - `watchedRelationships: optional array of object { direction, key }`

        - `direction: "SOURCE" or "DESTINATION"`

          The endpoint occupied by the record whose changes start the run.

          - `"SOURCE"`

          - `"DESTINATION"`

        - `key: string`

          Public relationship key, such as `$contact` or a custom relationship slug.

    - `SequenceReplyTrigger object { type }`

      - `type: "SEQUENCE_REPLY"`

        - `"SEQUENCE_REPLY"`

  - `updatedAt: string`

    When the automation was last changed.

### Example

```http
curl https://api.lightfield.app/v1/automations \
    -H 'Content-Type: application/json' \
    -H 'Lightfield-Version: 2026-03-01' \
    -H "Authorization: Bearer $API_KEY" \
    -d '{
          "name": "x",
          "steps": [
            {
              "name": "x",
              "prompt": "x",
              "type": "AGENT"
            }
          ],
          "triggers": [
            {
              "type": "MANUAL"
            }
          ]
        }'
```

#### Response

```json
{
  "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"
}
```

## List automations

**get** `/v1/automations`

> [!WARNING]
This endpoint is in beta and isn't available to every workspace yet. Its parameters and response schemas may change, including breaking changes.

Returns a preview of each of the workspace’s live automations, newest first: its name, status, trigger types, step count and when it last ran and last failed. Retrieve an automation for its steps and trigger details. Automations never published from the app and personal assistant automations are not listed.

Requires an API key whose user is a workspace owner or admin.

**[Required scope](/using-the-api/scopes/):** `automations:read`

**[Rate limit category](/using-the-api/rate-limits/):** Search

### Query Parameters

- `limit: optional number`

  Maximum number of records to return. Defaults to 25, maximum 25.

- `offset: optional number`

  Number of records to skip for pagination. Defaults to 0.

### Returns

- `AutomationListResponse object { data, object, totalCount }`

  - `data: array of object { id, createdAt, description, 8 more }`

    - `id: string`

      Unique identifier of the automation.

    - `createdAt: string`

      When the automation was created.

    - `description: string`

      What the automation is meant to accomplish.

    - `lastFailureAt: string`

      When its most recent failed run ended, test runs included; null if no run has failed.

    - `lastRunAt: string`

      When its most recent run started, test runs included; null before the first run.

    - `name: string`

      Display name of the automation.

    - `objectType: "automation"`

      Always `automation`.

      - `"automation"`

    - `status: "ACTIVE" or "PAUSED"`

      `PAUSED` automations keep their triggers but start no runs.

      - `"ACTIVE"`

      - `"PAUSED"`

    - `stepCount: number`

      How many steps a run has.

    - `triggerTypes: array of "MANUAL" or "WEBHOOK" or "SCHEDULED" or 3 more`

      The kinds of trigger that start a run, each listed once.

      - `"MANUAL"`

      - `"WEBHOOK"`

      - `"SCHEDULED"`

      - `"RECORD_CREATED"`

      - `"RECORD_UPDATED"`

      - `"SEQUENCE_REPLY"`

    - `updatedAt: string`

      When the automation was last changed.

  - `object: "list"`

    - `"list"`

  - `totalCount: number`

### Example

```http
curl https://api.lightfield.app/v1/automations \
    -H 'Lightfield-Version: 2026-03-01' \
    -H "Authorization: Bearer $API_KEY"
```

#### Response

```json
{
  "data": [
    {
      "id": "id",
      "createdAt": "createdAt",
      "description": "description",
      "lastFailureAt": "lastFailureAt",
      "lastRunAt": "lastRunAt",
      "name": "x",
      "objectType": "automation",
      "status": "ACTIVE",
      "stepCount": -9007199254740991,
      "triggerTypes": [
        "MANUAL"
      ],
      "updatedAt": "updatedAt"
    }
  ],
  "object": "list",
  "totalCount": -9007199254740991
}
```

## Retrieve an automation

**get** `/v1/automations/{id}`

> [!WARNING]
This endpoint is in beta and isn't available to every workspace yet. Its parameters and response schemas may change, including breaking changes.

Retrieves an automation’s live version, including relationship watches and their resolved directions. Inputs, skills and files set in the app are not part of the response.

Requires an API key whose user is a workspace owner or admin.

**[Required scope](/using-the-api/scopes/):** `automations:read`

**[Rate limit category](/using-the-api/rate-limits/):** Read

### Path Parameters

- `id: string`

  Unique identifier of the automation to retrieve.

### Returns

- `AutomationRetrieveResponse object { id, createdAt, description, 10 more }`

  - `id: string`

    Unique identifier of the automation.

  - `createdAt: string`

    When the automation was created.

  - `description: string`

    What the automation is meant to accomplish.

  - `lastFailureAt: string`

    When its most recent failed run ended, test runs included; null if no run has failed.

  - `lastRunAt: string`

    When its most recent run started, test runs included; null before the first run.

  - `model: string`

    Model the agent steps run on.

  - `name: string`

    Display name of the automation.

  - `objectType: "automation"`

    Always `automation`.

    - `"automation"`

  - `runAs: object { type }  or object { memberId, type }  or object { type }`

    Who the automation acts as.

    - `WorkspaceRunAs object { type }`

      Runs with no acting member.

      - `type: "WORKSPACE"`

        - `"WORKSPACE"`

    - `MemberRunAs object { memberId, type }`

      - `memberId: string`

        Member the automation runs as.

      - `type: "MEMBER"`

        - `"MEMBER"`

    - `FromInputRunAs object { type }`

      The acting member is read from an input when a run starts. Set in the Lightfield app.

      - `type: "FROM_INPUT"`

        - `"FROM_INPUT"`

  - `status: "ACTIVE" or "PAUSED"`

    `PAUSED` automations keep their triggers but start no runs.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `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 }`

      - `id: string`

        Step identifier. Assigned by Lightfield.

      - `name: string`

        Display name of the step.

      - `prompt: string`

        Instructions the agent follows in this step.

      - `type: "AGENT"`

        - `"AGENT"`

      - `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.

        - `ToolPermission object { name, type, reason }`

          - `name: string`

            Name of the tool, matching the Lightfield app.

          - `type: "TOOL"`

            - `"TOOL"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

        - `McpPermission object { connector, tools, type, reason }`

          - `connector: string`

            Connector the tools are on. Must already be lowercase and trimmed.

          - `tools: array of string`

            Unique, trimmed names of the connector tools the step may call.

          - `type: "MCP"`

            - `"MCP"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

        - `APIPermission object { scopes, type, reason }`

          - `scopes: array of string`

            Lightfield API scopes the step may use, for example `contacts:read`. The API key must hold every scope it grants, and only a full-access key may grant `*`.

          - `type: "API"`

            - `"API"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

        - `NetworkPermission object { domain, type, headers, 2 more }`

          - `domain: string`

            Lowercase host the step may call, optionally followed by a path glob. Returns 422 for a scheme, query, fragment or surrounding whitespace.

          - `type: "NETWORK"`

            - `"NETWORK"`

          - `headers: optional map[string]`

            Headers added to every request this permission allows.

          - `method: optional "GET" or "POST" or "PUT" or 2 more`

            Restricts the permission to one HTTP method.

            - `"GET"`

            - `"POST"`

            - `"PUT"`

            - `"PATCH"`

            - `"DELETE"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

    - `CodeStep object { id, command, name, 3 more }`

      - `id: string`

        Step identifier. Assigned by Lightfield.

      - `command: string`

        Bash command the step runs as written.

      - `name: string`

        Display name of the step.

      - `type: "CODE"`

        - `"CODE"`

      - `description: optional string`

        What the command does. Does not change what runs.

      - `permissions: optional array of object { scopes, type, reason }  or object { domain, type, headers, 2 more }`

        What the command may use. Defaults to none.

        - `APIPermission object { scopes, type, reason }`

          - `scopes: array of string`

            Lightfield API scopes the step may use, for example `contacts:read`. The API key must hold every scope it grants, and only a full-access key may grant `*`.

          - `type: "API"`

            - `"API"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

        - `NetworkPermission object { domain, type, headers, 2 more }`

          - `domain: string`

            Lowercase host the step may call, optionally followed by a path glob. Returns 422 for a scheme, query, fragment or surrounding whitespace.

          - `type: "NETWORK"`

            - `"NETWORK"`

          - `headers: optional map[string]`

            Headers added to every request this permission allows.

          - `method: optional "GET" or "POST" or "PUT" or 2 more`

            Restricts the permission to one HTTP method.

            - `"GET"`

            - `"POST"`

            - `"PUT"`

            - `"PATCH"`

            - `"DELETE"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

    - `SleepStep object { id, duration, name, 2 more }`

      - `id: string`

        Step identifier. Assigned by Lightfield.

      - `duration: number or string`

        How long to sleep before the next step, at most one year.

        - `number`

        - `string`

      - `name: string`

        Display name of the step.

      - `type: "SLEEP"`

        - `"SLEEP"`

      - `unit: "MILLISECOND" or "SECOND" or "MINUTE" or 2 more`

        Unit of `duration`.

        - `"MILLISECOND"`

        - `"SECOND"`

        - `"MINUTE"`

        - `"HOUR"`

        - `"DAY"`

  - `triggers: array of object { type }  or object { type, url, exampleResult }  or object { schedule, type }  or 3 more`

    - `ManualTrigger object { type }`

      - `type: "MANUAL"`

        - `"MANUAL"`

    - `WebhookTrigger object { type, url, exampleResult }`

      - `type: "WEBHOOK"`

        - `"WEBHOOK"`

      - `url: string`

        URL that starts a run when it receives a POST request.

      - `exampleResult: optional object { json, parsed }`

        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`

          - `map[string or number or boolean or 2 more]`

            - `string`

            - `number`

            - `boolean`

            - `array of string or number or boolean or 2 more`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

            - `map[string or number or boolean or 2 more]`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

          - `array of string or number or boolean or 2 more`

            - `string`

            - `number`

            - `boolean`

            - `array of string or number or boolean or 2 more`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

            - `map[string or number or boolean or 2 more]`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

        - `parsed: array of object { path, label, value }`

          - `path: array of string`

          - `label: optional string`

          - `value: optional string or number or boolean or 2 more`

            - `string`

            - `number`

            - `boolean`

            - `array of string or number or boolean or 2 more`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

            - `map[string or number or boolean or 2 more]`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

    - `ScheduledTrigger object { schedule, type }`

      - `schedule: object { cron, timezone }`

        - `cron: string`

          Cron expression: 5 fields, 6 with a leading seconds field, or a macro such as `@daily`. For example `0 9 * * 1-5`.

        - `timezone: string`

          IANA timezone the cron is evaluated in.

      - `type: "SCHEDULED"`

        - `"SCHEDULED"`

    - `RecordCreatedTrigger object { objectType, type }`

      - `objectType: string`

      - `type: "RECORD_CREATED"`

        - `"RECORD_CREATED"`

    - `RecordUpdatedTrigger object { objectType, type, watchedFields, watchedRelationships }`

      - `objectType: string`

      - `type: "RECORD_UPDATED"`

        - `"RECORD_UPDATED"`

      - `watchedFields: array of string`

      - `watchedRelationships: optional array of object { direction, key }`

        - `direction: "SOURCE" or "DESTINATION"`

          The endpoint occupied by the record whose changes start the run.

          - `"SOURCE"`

          - `"DESTINATION"`

        - `key: string`

          Public relationship key, such as `$contact` or a custom relationship slug.

    - `SequenceReplyTrigger object { type }`

      - `type: "SEQUENCE_REPLY"`

        - `"SEQUENCE_REPLY"`

  - `updatedAt: string`

    When the automation was last changed.

### Example

```http
curl https://api.lightfield.app/v1/automations/$ID \
    -H 'Lightfield-Version: 2026-03-01' \
    -H "Authorization: Bearer $API_KEY"
```

#### Response

```json
{
  "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"
}
```

## Update an automation

**post** `/v1/automations/{id}`

> [!WARNING]
This endpoint is in beta and isn't available to every workspace yet. Its parameters and response schemas may change, including breaking changes.

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](/using-the-api/scopes/):** `automations:update`

**[Rate limit category](/using-the-api/rate-limits/):** Write

### Path Parameters

- `id: string`

  Unique identifier of the automation to update.

### Body Parameters

- `description: optional string`

  What the automation is meant to accomplish.

- `model: optional "auto" or "auto_low" or "auto_high" or 4 more`

  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`.

  - `"auto"`

  - `"auto_low"`

  - `"auto_high"`

  - `"sonnet_5_5"`

  - `"haiku_5_5"`

  - `"gpt_6_1_terra"`

  - `"gpt_6_luna"`

- `name: optional string`

  Display name of the automation.

- `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.

  - `WorkspaceRunAs object { type }`

    Runs with no acting member.

    - `type: "WORKSPACE"`

      - `"WORKSPACE"`

  - `MemberRunAs object { memberId, type }`

    - `memberId: string`

      Member the automation runs as.

    - `type: "MEMBER"`

      - `"MEMBER"`

- `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.

  - `AgentStep object { name, prompt, type, permissions }`

    - `name: string`

      Display name of the step.

    - `prompt: string`

      Instructions the agent follows in this step.

    - `type: "AGENT"`

      - `"AGENT"`

    - `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.

      - `ToolPermission object { name, type, reason }`

        - `name: string`

          Name of the tool, matching the Lightfield app.

        - `type: "TOOL"`

          - `"TOOL"`

        - `reason: optional string`

          Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

      - `McpPermission object { connector, tools, type, reason }`

        - `connector: string`

          Connector the tools are on. Must already be lowercase and trimmed.

        - `tools: array of string`

          Unique, trimmed names of the connector tools the step may call.

        - `type: "MCP"`

          - `"MCP"`

        - `reason: optional string`

          Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

      - `APIPermission object { scopes, type, reason }`

        - `scopes: array of string`

          Lightfield API scopes the step may use, for example `contacts:read`. The API key must hold every scope it grants, and only a full-access key may grant `*`.

        - `type: "API"`

          - `"API"`

        - `reason: optional string`

          Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

      - `NetworkPermission object { domain, type, headers, 2 more }`

        - `domain: string`

          Lowercase host the step may call, optionally followed by a path glob. Returns 422 for a scheme, query, fragment or surrounding whitespace.

        - `type: "NETWORK"`

          - `"NETWORK"`

        - `headers: optional map[string]`

          Headers added to every request this permission allows.

        - `method: optional "GET" or "POST" or "PUT" or 2 more`

          Restricts the permission to one HTTP method.

          - `"GET"`

          - `"POST"`

          - `"PUT"`

          - `"PATCH"`

          - `"DELETE"`

        - `reason: optional string`

          Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

  - `CodeStep object { command, name, type, 2 more }`

    - `command: string`

      Bash command the step runs as written.

    - `name: string`

      Display name of the step.

    - `type: "CODE"`

      - `"CODE"`

    - `description: optional string`

      What the command does. Does not change what runs.

    - `permissions: optional array of object { scopes, type, reason }  or object { domain, type, headers, 2 more }`

      What the command may use. Defaults to none.

      - `APIPermission object { scopes, type, reason }`

        - `scopes: array of string`

          Lightfield API scopes the step may use, for example `contacts:read`. The API key must hold every scope it grants, and only a full-access key may grant `*`.

        - `type: "API"`

          - `"API"`

        - `reason: optional string`

          Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

      - `NetworkPermission object { domain, type, headers, 2 more }`

        - `domain: string`

          Lowercase host the step may call, optionally followed by a path glob. Returns 422 for a scheme, query, fragment or surrounding whitespace.

        - `type: "NETWORK"`

          - `"NETWORK"`

        - `headers: optional map[string]`

          Headers added to every request this permission allows.

        - `method: optional "GET" or "POST" or "PUT" or 2 more`

          Restricts the permission to one HTTP method.

          - `"GET"`

          - `"POST"`

          - `"PUT"`

          - `"PATCH"`

          - `"DELETE"`

        - `reason: optional string`

          Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

  - `SleepStep object { duration, name, type, unit }`

    - `duration: number or string`

      How long to sleep before the next step, at most one year.

      - `number`

      - `string`

    - `name: string`

      Display name of the step.

    - `type: "SLEEP"`

      - `"SLEEP"`

    - `unit: "MILLISECOND" or "SECOND" or "MINUTE" or 2 more`

      Unit of `duration`.

      - `"MILLISECOND"`

      - `"SECOND"`

      - `"MINUTE"`

      - `"HOUR"`

      - `"DAY"`

- `triggers: optional array of object { type }  or object { type, exampleResult }  or object { schedule, type }  or 3 more`

  What starts a run.

  - `ManualTrigger object { type }`

    - `type: "MANUAL"`

      - `"MANUAL"`

  - `WebhookTrigger object { type, exampleResult }`

    - `type: "WEBHOOK"`

      - `"WEBHOOK"`

    - `exampleResult: optional object { json, parsed }`

      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`

        - `map[string or number or boolean or 2 more]`

          - `string`

          - `number`

          - `boolean`

          - `array of string or number or boolean or 2 more`

            - `string`

            - `number`

            - `boolean`

            - `array of JsonValue`

              - `string`

              - `number`

              - `boolean`

              - `array of unknown`

              - `unknown`

            - `map[JsonValue]`

              - `string`

              - `number`

              - `boolean`

              - `array of unknown`

              - `unknown`

          - `map[string or number or boolean or 2 more]`

            - `string`

            - `number`

            - `boolean`

            - `array of JsonValue`

              - `string`

              - `number`

              - `boolean`

              - `array of unknown`

              - `unknown`

            - `map[JsonValue]`

              - `string`

              - `number`

              - `boolean`

              - `array of unknown`

              - `unknown`

        - `array of string or number or boolean or 2 more`

          - `string`

          - `number`

          - `boolean`

          - `array of string or number or boolean or 2 more`

            - `string`

            - `number`

            - `boolean`

            - `array of JsonValue`

              - `string`

              - `number`

              - `boolean`

              - `array of unknown`

              - `unknown`

            - `map[JsonValue]`

              - `string`

              - `number`

              - `boolean`

              - `array of unknown`

              - `unknown`

          - `map[string or number or boolean or 2 more]`

            - `string`

            - `number`

            - `boolean`

            - `array of JsonValue`

              - `string`

              - `number`

              - `boolean`

              - `array of unknown`

              - `unknown`

            - `map[JsonValue]`

              - `string`

              - `number`

              - `boolean`

              - `array of unknown`

              - `unknown`

      - `parsed: array of object { path, label, value }`

        - `path: array of string`

        - `label: optional string`

        - `value: optional string or number or boolean or 2 more`

          - `string`

          - `number`

          - `boolean`

          - `array of string or number or boolean or 2 more`

            - `string`

            - `number`

            - `boolean`

            - `array of JsonValue`

              - `string`

              - `number`

              - `boolean`

              - `array of unknown`

              - `unknown`

            - `map[JsonValue]`

              - `string`

              - `number`

              - `boolean`

              - `array of unknown`

              - `unknown`

          - `map[string or number or boolean or 2 more]`

            - `string`

            - `number`

            - `boolean`

            - `array of JsonValue`

              - `string`

              - `number`

              - `boolean`

              - `array of unknown`

              - `unknown`

            - `map[JsonValue]`

              - `string`

              - `number`

              - `boolean`

              - `array of unknown`

              - `unknown`

  - `ScheduledTrigger object { schedule, type }`

    - `schedule: object { cron, timezone }`

      - `cron: string`

        Cron expression: 5 fields, 6 with a leading seconds field, or a macro such as `@daily`. For example `0 9 * * 1-5`.

      - `timezone: string`

        IANA timezone the cron is evaluated in.

    - `type: "SCHEDULED"`

      - `"SCHEDULED"`

  - `RecordCreatedTrigger object { objectType, type }`

    - `objectType: string`

      Record type to watch: `$account`, `$contact`, `$opportunity`, `$meeting`, `$task`, `$note`, `$email`, or the slug of a custom object. The `$` marks a built-in; a bare name is always a custom object slug.

    - `type: "RECORD_CREATED"`

      - `"RECORD_CREATED"`

  - `RecordUpdatedTrigger object { objectType, type, watchedFields, watchedRelationships }`

    - `objectType: string`

    - `type: "RECORD_UPDATED"`

      - `"RECORD_UPDATED"`

    - `watchedFields: optional array of string`

      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.

    - `watchedRelationships: optional array of object { key, direction }`

      Relationships whose additions or removals start a run.

      - `key: string`

        Public relationship key, such as `$contact` or a custom relationship slug.

      - `direction: optional "SOURCE" or "DESTINATION"`

        Optional when the endpoint object types differ. Required for a self-relationship. A contradictory or ambiguous direction returns 422.

        - `"SOURCE"`

        - `"DESTINATION"`

  - `SequenceReplyTrigger object { type }`

    - `type: "SEQUENCE_REPLY"`

      - `"SEQUENCE_REPLY"`

### Returns

- `AutomationUpdateResponse object { id, createdAt, description, 10 more }`

  - `id: string`

    Unique identifier of the automation.

  - `createdAt: string`

    When the automation was created.

  - `description: string`

    What the automation is meant to accomplish.

  - `lastFailureAt: string`

    When its most recent failed run ended, test runs included; null if no run has failed.

  - `lastRunAt: string`

    When its most recent run started, test runs included; null before the first run.

  - `model: string`

    Model the agent steps run on.

  - `name: string`

    Display name of the automation.

  - `objectType: "automation"`

    Always `automation`.

    - `"automation"`

  - `runAs: object { type }  or object { memberId, type }  or object { type }`

    Who the automation acts as.

    - `WorkspaceRunAs object { type }`

      Runs with no acting member.

      - `type: "WORKSPACE"`

        - `"WORKSPACE"`

    - `MemberRunAs object { memberId, type }`

      - `memberId: string`

        Member the automation runs as.

      - `type: "MEMBER"`

        - `"MEMBER"`

    - `FromInputRunAs object { type }`

      The acting member is read from an input when a run starts. Set in the Lightfield app.

      - `type: "FROM_INPUT"`

        - `"FROM_INPUT"`

  - `status: "ACTIVE" or "PAUSED"`

    `PAUSED` automations keep their triggers but start no runs.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `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 }`

      - `id: string`

        Step identifier. Assigned by Lightfield.

      - `name: string`

        Display name of the step.

      - `prompt: string`

        Instructions the agent follows in this step.

      - `type: "AGENT"`

        - `"AGENT"`

      - `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.

        - `ToolPermission object { name, type, reason }`

          - `name: string`

            Name of the tool, matching the Lightfield app.

          - `type: "TOOL"`

            - `"TOOL"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

        - `McpPermission object { connector, tools, type, reason }`

          - `connector: string`

            Connector the tools are on. Must already be lowercase and trimmed.

          - `tools: array of string`

            Unique, trimmed names of the connector tools the step may call.

          - `type: "MCP"`

            - `"MCP"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

        - `APIPermission object { scopes, type, reason }`

          - `scopes: array of string`

            Lightfield API scopes the step may use, for example `contacts:read`. The API key must hold every scope it grants, and only a full-access key may grant `*`.

          - `type: "API"`

            - `"API"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

        - `NetworkPermission object { domain, type, headers, 2 more }`

          - `domain: string`

            Lowercase host the step may call, optionally followed by a path glob. Returns 422 for a scheme, query, fragment or surrounding whitespace.

          - `type: "NETWORK"`

            - `"NETWORK"`

          - `headers: optional map[string]`

            Headers added to every request this permission allows.

          - `method: optional "GET" or "POST" or "PUT" or 2 more`

            Restricts the permission to one HTTP method.

            - `"GET"`

            - `"POST"`

            - `"PUT"`

            - `"PATCH"`

            - `"DELETE"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

    - `CodeStep object { id, command, name, 3 more }`

      - `id: string`

        Step identifier. Assigned by Lightfield.

      - `command: string`

        Bash command the step runs as written.

      - `name: string`

        Display name of the step.

      - `type: "CODE"`

        - `"CODE"`

      - `description: optional string`

        What the command does. Does not change what runs.

      - `permissions: optional array of object { scopes, type, reason }  or object { domain, type, headers, 2 more }`

        What the command may use. Defaults to none.

        - `APIPermission object { scopes, type, reason }`

          - `scopes: array of string`

            Lightfield API scopes the step may use, for example `contacts:read`. The API key must hold every scope it grants, and only a full-access key may grant `*`.

          - `type: "API"`

            - `"API"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

        - `NetworkPermission object { domain, type, headers, 2 more }`

          - `domain: string`

            Lowercase host the step may call, optionally followed by a path glob. Returns 422 for a scheme, query, fragment or surrounding whitespace.

          - `type: "NETWORK"`

            - `"NETWORK"`

          - `headers: optional map[string]`

            Headers added to every request this permission allows.

          - `method: optional "GET" or "POST" or "PUT" or 2 more`

            Restricts the permission to one HTTP method.

            - `"GET"`

            - `"POST"`

            - `"PUT"`

            - `"PATCH"`

            - `"DELETE"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

    - `SleepStep object { id, duration, name, 2 more }`

      - `id: string`

        Step identifier. Assigned by Lightfield.

      - `duration: number or string`

        How long to sleep before the next step, at most one year.

        - `number`

        - `string`

      - `name: string`

        Display name of the step.

      - `type: "SLEEP"`

        - `"SLEEP"`

      - `unit: "MILLISECOND" or "SECOND" or "MINUTE" or 2 more`

        Unit of `duration`.

        - `"MILLISECOND"`

        - `"SECOND"`

        - `"MINUTE"`

        - `"HOUR"`

        - `"DAY"`

  - `triggers: array of object { type }  or object { type, url, exampleResult }  or object { schedule, type }  or 3 more`

    - `ManualTrigger object { type }`

      - `type: "MANUAL"`

        - `"MANUAL"`

    - `WebhookTrigger object { type, url, exampleResult }`

      - `type: "WEBHOOK"`

        - `"WEBHOOK"`

      - `url: string`

        URL that starts a run when it receives a POST request.

      - `exampleResult: optional object { json, parsed }`

        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`

          - `map[string or number or boolean or 2 more]`

            - `string`

            - `number`

            - `boolean`

            - `array of string or number or boolean or 2 more`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

            - `map[string or number or boolean or 2 more]`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

          - `array of string or number or boolean or 2 more`

            - `string`

            - `number`

            - `boolean`

            - `array of string or number or boolean or 2 more`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

            - `map[string or number or boolean or 2 more]`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

        - `parsed: array of object { path, label, value }`

          - `path: array of string`

          - `label: optional string`

          - `value: optional string or number or boolean or 2 more`

            - `string`

            - `number`

            - `boolean`

            - `array of string or number or boolean or 2 more`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

            - `map[string or number or boolean or 2 more]`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

    - `ScheduledTrigger object { schedule, type }`

      - `schedule: object { cron, timezone }`

        - `cron: string`

          Cron expression: 5 fields, 6 with a leading seconds field, or a macro such as `@daily`. For example `0 9 * * 1-5`.

        - `timezone: string`

          IANA timezone the cron is evaluated in.

      - `type: "SCHEDULED"`

        - `"SCHEDULED"`

    - `RecordCreatedTrigger object { objectType, type }`

      - `objectType: string`

      - `type: "RECORD_CREATED"`

        - `"RECORD_CREATED"`

    - `RecordUpdatedTrigger object { objectType, type, watchedFields, watchedRelationships }`

      - `objectType: string`

      - `type: "RECORD_UPDATED"`

        - `"RECORD_UPDATED"`

      - `watchedFields: array of string`

      - `watchedRelationships: optional array of object { direction, key }`

        - `direction: "SOURCE" or "DESTINATION"`

          The endpoint occupied by the record whose changes start the run.

          - `"SOURCE"`

          - `"DESTINATION"`

        - `key: string`

          Public relationship key, such as `$contact` or a custom relationship slug.

    - `SequenceReplyTrigger object { type }`

      - `type: "SEQUENCE_REPLY"`

        - `"SEQUENCE_REPLY"`

  - `updatedAt: string`

    When the automation was last changed.

### Example

```http
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 '{}'
```

#### Response

```json
{
  "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"
}
```

## Pause an automation

**post** `/v1/automations/{id}/pause`

> [!WARNING]
This endpoint is in beta and isn't available to every workspace yet. Its parameters and response schemas may change, including breaking changes.

Stops an automation from starting runs. A paused automation is returned unchanged.

Requires an API key whose user is a workspace owner or admin.

**[Required scope](/using-the-api/scopes/):** `automations:update`

**[Rate limit category](/using-the-api/rate-limits/):** Write

### Path Parameters

- `id: string`

  Unique identifier of the automation to pause.

### Body Parameters

- `body: optional object {  }`

### Returns

- `AutomationPauseResponse object { id, createdAt, description, 10 more }`

  - `id: string`

    Unique identifier of the automation.

  - `createdAt: string`

    When the automation was created.

  - `description: string`

    What the automation is meant to accomplish.

  - `lastFailureAt: string`

    When its most recent failed run ended, test runs included; null if no run has failed.

  - `lastRunAt: string`

    When its most recent run started, test runs included; null before the first run.

  - `model: string`

    Model the agent steps run on.

  - `name: string`

    Display name of the automation.

  - `objectType: "automation"`

    Always `automation`.

    - `"automation"`

  - `runAs: object { type }  or object { memberId, type }  or object { type }`

    Who the automation acts as.

    - `WorkspaceRunAs object { type }`

      Runs with no acting member.

      - `type: "WORKSPACE"`

        - `"WORKSPACE"`

    - `MemberRunAs object { memberId, type }`

      - `memberId: string`

        Member the automation runs as.

      - `type: "MEMBER"`

        - `"MEMBER"`

    - `FromInputRunAs object { type }`

      The acting member is read from an input when a run starts. Set in the Lightfield app.

      - `type: "FROM_INPUT"`

        - `"FROM_INPUT"`

  - `status: "ACTIVE" or "PAUSED"`

    `PAUSED` automations keep their triggers but start no runs.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `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 }`

      - `id: string`

        Step identifier. Assigned by Lightfield.

      - `name: string`

        Display name of the step.

      - `prompt: string`

        Instructions the agent follows in this step.

      - `type: "AGENT"`

        - `"AGENT"`

      - `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.

        - `ToolPermission object { name, type, reason }`

          - `name: string`

            Name of the tool, matching the Lightfield app.

          - `type: "TOOL"`

            - `"TOOL"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

        - `McpPermission object { connector, tools, type, reason }`

          - `connector: string`

            Connector the tools are on. Must already be lowercase and trimmed.

          - `tools: array of string`

            Unique, trimmed names of the connector tools the step may call.

          - `type: "MCP"`

            - `"MCP"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

        - `APIPermission object { scopes, type, reason }`

          - `scopes: array of string`

            Lightfield API scopes the step may use, for example `contacts:read`. The API key must hold every scope it grants, and only a full-access key may grant `*`.

          - `type: "API"`

            - `"API"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

        - `NetworkPermission object { domain, type, headers, 2 more }`

          - `domain: string`

            Lowercase host the step may call, optionally followed by a path glob. Returns 422 for a scheme, query, fragment or surrounding whitespace.

          - `type: "NETWORK"`

            - `"NETWORK"`

          - `headers: optional map[string]`

            Headers added to every request this permission allows.

          - `method: optional "GET" or "POST" or "PUT" or 2 more`

            Restricts the permission to one HTTP method.

            - `"GET"`

            - `"POST"`

            - `"PUT"`

            - `"PATCH"`

            - `"DELETE"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

    - `CodeStep object { id, command, name, 3 more }`

      - `id: string`

        Step identifier. Assigned by Lightfield.

      - `command: string`

        Bash command the step runs as written.

      - `name: string`

        Display name of the step.

      - `type: "CODE"`

        - `"CODE"`

      - `description: optional string`

        What the command does. Does not change what runs.

      - `permissions: optional array of object { scopes, type, reason }  or object { domain, type, headers, 2 more }`

        What the command may use. Defaults to none.

        - `APIPermission object { scopes, type, reason }`

          - `scopes: array of string`

            Lightfield API scopes the step may use, for example `contacts:read`. The API key must hold every scope it grants, and only a full-access key may grant `*`.

          - `type: "API"`

            - `"API"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

        - `NetworkPermission object { domain, type, headers, 2 more }`

          - `domain: string`

            Lowercase host the step may call, optionally followed by a path glob. Returns 422 for a scheme, query, fragment or surrounding whitespace.

          - `type: "NETWORK"`

            - `"NETWORK"`

          - `headers: optional map[string]`

            Headers added to every request this permission allows.

          - `method: optional "GET" or "POST" or "PUT" or 2 more`

            Restricts the permission to one HTTP method.

            - `"GET"`

            - `"POST"`

            - `"PUT"`

            - `"PATCH"`

            - `"DELETE"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

    - `SleepStep object { id, duration, name, 2 more }`

      - `id: string`

        Step identifier. Assigned by Lightfield.

      - `duration: number or string`

        How long to sleep before the next step, at most one year.

        - `number`

        - `string`

      - `name: string`

        Display name of the step.

      - `type: "SLEEP"`

        - `"SLEEP"`

      - `unit: "MILLISECOND" or "SECOND" or "MINUTE" or 2 more`

        Unit of `duration`.

        - `"MILLISECOND"`

        - `"SECOND"`

        - `"MINUTE"`

        - `"HOUR"`

        - `"DAY"`

  - `triggers: array of object { type }  or object { type, url, exampleResult }  or object { schedule, type }  or 3 more`

    - `ManualTrigger object { type }`

      - `type: "MANUAL"`

        - `"MANUAL"`

    - `WebhookTrigger object { type, url, exampleResult }`

      - `type: "WEBHOOK"`

        - `"WEBHOOK"`

      - `url: string`

        URL that starts a run when it receives a POST request.

      - `exampleResult: optional object { json, parsed }`

        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`

          - `map[string or number or boolean or 2 more]`

            - `string`

            - `number`

            - `boolean`

            - `array of string or number or boolean or 2 more`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

            - `map[string or number or boolean or 2 more]`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

          - `array of string or number or boolean or 2 more`

            - `string`

            - `number`

            - `boolean`

            - `array of string or number or boolean or 2 more`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

            - `map[string or number or boolean or 2 more]`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

        - `parsed: array of object { path, label, value }`

          - `path: array of string`

          - `label: optional string`

          - `value: optional string or number or boolean or 2 more`

            - `string`

            - `number`

            - `boolean`

            - `array of string or number or boolean or 2 more`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

            - `map[string or number or boolean or 2 more]`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

    - `ScheduledTrigger object { schedule, type }`

      - `schedule: object { cron, timezone }`

        - `cron: string`

          Cron expression: 5 fields, 6 with a leading seconds field, or a macro such as `@daily`. For example `0 9 * * 1-5`.

        - `timezone: string`

          IANA timezone the cron is evaluated in.

      - `type: "SCHEDULED"`

        - `"SCHEDULED"`

    - `RecordCreatedTrigger object { objectType, type }`

      - `objectType: string`

      - `type: "RECORD_CREATED"`

        - `"RECORD_CREATED"`

    - `RecordUpdatedTrigger object { objectType, type, watchedFields, watchedRelationships }`

      - `objectType: string`

      - `type: "RECORD_UPDATED"`

        - `"RECORD_UPDATED"`

      - `watchedFields: array of string`

      - `watchedRelationships: optional array of object { direction, key }`

        - `direction: "SOURCE" or "DESTINATION"`

          The endpoint occupied by the record whose changes start the run.

          - `"SOURCE"`

          - `"DESTINATION"`

        - `key: string`

          Public relationship key, such as `$contact` or a custom relationship slug.

    - `SequenceReplyTrigger object { type }`

      - `type: "SEQUENCE_REPLY"`

        - `"SEQUENCE_REPLY"`

  - `updatedAt: string`

    When the automation was last changed.

### Example

```http
curl https://api.lightfield.app/v1/automations/$ID/pause \
    -X POST \
    -H 'Lightfield-Version: 2026-03-01' \
    -H "Authorization: Bearer $API_KEY"
```

#### Response

```json
{
  "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"
}
```

## Resume an automation

**post** `/v1/automations/{id}/resume`

> [!WARNING]
This endpoint is in beta and isn't available to every workspace yet. Its parameters and response schemas may change, including breaking changes.

Lets a paused automation start runs again. An active automation is returned unchanged.

Requires an API key whose user is a workspace owner or admin.

**[Required scope](/using-the-api/scopes/):** `automations:update`

**[Rate limit category](/using-the-api/rate-limits/):** Write

### Path Parameters

- `id: string`

  Unique identifier of the automation to resume.

### Body Parameters

- `body: optional object {  }`

### Returns

- `AutomationResumeResponse object { id, createdAt, description, 10 more }`

  - `id: string`

    Unique identifier of the automation.

  - `createdAt: string`

    When the automation was created.

  - `description: string`

    What the automation is meant to accomplish.

  - `lastFailureAt: string`

    When its most recent failed run ended, test runs included; null if no run has failed.

  - `lastRunAt: string`

    When its most recent run started, test runs included; null before the first run.

  - `model: string`

    Model the agent steps run on.

  - `name: string`

    Display name of the automation.

  - `objectType: "automation"`

    Always `automation`.

    - `"automation"`

  - `runAs: object { type }  or object { memberId, type }  or object { type }`

    Who the automation acts as.

    - `WorkspaceRunAs object { type }`

      Runs with no acting member.

      - `type: "WORKSPACE"`

        - `"WORKSPACE"`

    - `MemberRunAs object { memberId, type }`

      - `memberId: string`

        Member the automation runs as.

      - `type: "MEMBER"`

        - `"MEMBER"`

    - `FromInputRunAs object { type }`

      The acting member is read from an input when a run starts. Set in the Lightfield app.

      - `type: "FROM_INPUT"`

        - `"FROM_INPUT"`

  - `status: "ACTIVE" or "PAUSED"`

    `PAUSED` automations keep their triggers but start no runs.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `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 }`

      - `id: string`

        Step identifier. Assigned by Lightfield.

      - `name: string`

        Display name of the step.

      - `prompt: string`

        Instructions the agent follows in this step.

      - `type: "AGENT"`

        - `"AGENT"`

      - `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.

        - `ToolPermission object { name, type, reason }`

          - `name: string`

            Name of the tool, matching the Lightfield app.

          - `type: "TOOL"`

            - `"TOOL"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

        - `McpPermission object { connector, tools, type, reason }`

          - `connector: string`

            Connector the tools are on. Must already be lowercase and trimmed.

          - `tools: array of string`

            Unique, trimmed names of the connector tools the step may call.

          - `type: "MCP"`

            - `"MCP"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

        - `APIPermission object { scopes, type, reason }`

          - `scopes: array of string`

            Lightfield API scopes the step may use, for example `contacts:read`. The API key must hold every scope it grants, and only a full-access key may grant `*`.

          - `type: "API"`

            - `"API"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

        - `NetworkPermission object { domain, type, headers, 2 more }`

          - `domain: string`

            Lowercase host the step may call, optionally followed by a path glob. Returns 422 for a scheme, query, fragment or surrounding whitespace.

          - `type: "NETWORK"`

            - `"NETWORK"`

          - `headers: optional map[string]`

            Headers added to every request this permission allows.

          - `method: optional "GET" or "POST" or "PUT" or 2 more`

            Restricts the permission to one HTTP method.

            - `"GET"`

            - `"POST"`

            - `"PUT"`

            - `"PATCH"`

            - `"DELETE"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

    - `CodeStep object { id, command, name, 3 more }`

      - `id: string`

        Step identifier. Assigned by Lightfield.

      - `command: string`

        Bash command the step runs as written.

      - `name: string`

        Display name of the step.

      - `type: "CODE"`

        - `"CODE"`

      - `description: optional string`

        What the command does. Does not change what runs.

      - `permissions: optional array of object { scopes, type, reason }  or object { domain, type, headers, 2 more }`

        What the command may use. Defaults to none.

        - `APIPermission object { scopes, type, reason }`

          - `scopes: array of string`

            Lightfield API scopes the step may use, for example `contacts:read`. The API key must hold every scope it grants, and only a full-access key may grant `*`.

          - `type: "API"`

            - `"API"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

        - `NetworkPermission object { domain, type, headers, 2 more }`

          - `domain: string`

            Lowercase host the step may call, optionally followed by a path glob. Returns 422 for a scheme, query, fragment or surrounding whitespace.

          - `type: "NETWORK"`

            - `"NETWORK"`

          - `headers: optional map[string]`

            Headers added to every request this permission allows.

          - `method: optional "GET" or "POST" or "PUT" or 2 more`

            Restricts the permission to one HTTP method.

            - `"GET"`

            - `"POST"`

            - `"PUT"`

            - `"PATCH"`

            - `"DELETE"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

    - `SleepStep object { id, duration, name, 2 more }`

      - `id: string`

        Step identifier. Assigned by Lightfield.

      - `duration: number or string`

        How long to sleep before the next step, at most one year.

        - `number`

        - `string`

      - `name: string`

        Display name of the step.

      - `type: "SLEEP"`

        - `"SLEEP"`

      - `unit: "MILLISECOND" or "SECOND" or "MINUTE" or 2 more`

        Unit of `duration`.

        - `"MILLISECOND"`

        - `"SECOND"`

        - `"MINUTE"`

        - `"HOUR"`

        - `"DAY"`

  - `triggers: array of object { type }  or object { type, url, exampleResult }  or object { schedule, type }  or 3 more`

    - `ManualTrigger object { type }`

      - `type: "MANUAL"`

        - `"MANUAL"`

    - `WebhookTrigger object { type, url, exampleResult }`

      - `type: "WEBHOOK"`

        - `"WEBHOOK"`

      - `url: string`

        URL that starts a run when it receives a POST request.

      - `exampleResult: optional object { json, parsed }`

        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`

          - `map[string or number or boolean or 2 more]`

            - `string`

            - `number`

            - `boolean`

            - `array of string or number or boolean or 2 more`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

            - `map[string or number or boolean or 2 more]`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

          - `array of string or number or boolean or 2 more`

            - `string`

            - `number`

            - `boolean`

            - `array of string or number or boolean or 2 more`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

            - `map[string or number or boolean or 2 more]`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

        - `parsed: array of object { path, label, value }`

          - `path: array of string`

          - `label: optional string`

          - `value: optional string or number or boolean or 2 more`

            - `string`

            - `number`

            - `boolean`

            - `array of string or number or boolean or 2 more`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

            - `map[string or number or boolean or 2 more]`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

    - `ScheduledTrigger object { schedule, type }`

      - `schedule: object { cron, timezone }`

        - `cron: string`

          Cron expression: 5 fields, 6 with a leading seconds field, or a macro such as `@daily`. For example `0 9 * * 1-5`.

        - `timezone: string`

          IANA timezone the cron is evaluated in.

      - `type: "SCHEDULED"`

        - `"SCHEDULED"`

    - `RecordCreatedTrigger object { objectType, type }`

      - `objectType: string`

      - `type: "RECORD_CREATED"`

        - `"RECORD_CREATED"`

    - `RecordUpdatedTrigger object { objectType, type, watchedFields, watchedRelationships }`

      - `objectType: string`

      - `type: "RECORD_UPDATED"`

        - `"RECORD_UPDATED"`

      - `watchedFields: array of string`

      - `watchedRelationships: optional array of object { direction, key }`

        - `direction: "SOURCE" or "DESTINATION"`

          The endpoint occupied by the record whose changes start the run.

          - `"SOURCE"`

          - `"DESTINATION"`

        - `key: string`

          Public relationship key, such as `$contact` or a custom relationship slug.

    - `SequenceReplyTrigger object { type }`

      - `type: "SEQUENCE_REPLY"`

        - `"SEQUENCE_REPLY"`

  - `updatedAt: string`

    When the automation was last changed.

### Example

```http
curl https://api.lightfield.app/v1/automations/$ID/resume \
    -X POST \
    -H 'Lightfield-Version: 2026-03-01' \
    -H "Authorization: Bearer $API_KEY"
```

#### Response

```json
{
  "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"
}
```

## Delete an automation

**delete** `/v1/automations/{id}`

> [!WARNING]
This endpoint is in beta and isn't available to every workspace yet. Its parameters and response schemas may change, including breaking changes.

Deletes an automation, turns off its triggers and dismisses the runs it has waiting for review. This cannot be undone; deleting it again returns 404.

Requires an API key whose user is a workspace owner or admin.

**[Required scope](/using-the-api/scopes/):** `automations:delete`

**[Rate limit category](/using-the-api/rate-limits/):** Write

### Path Parameters

- `id: string`

  Unique identifier of the automation to delete.

### Body Parameters

- `body: optional object {  }`

### Returns

- `AutomationDeleteResponse object { id, deleted, objectType }`

  - `id: string`

  - `deleted: boolean`

    Always `true`.

  - `objectType: "automation"`

    - `"automation"`

### Example

```http
curl https://api.lightfield.app/v1/automations/$ID \
    -X DELETE \
    -H 'Lightfield-Version: 2026-03-01' \
    -H "Authorization: Bearer $API_KEY"
```

#### Response

```json
{
  "id": "id",
  "deleted": true,
  "objectType": "automation"
}
```

## Domain Types

### Automation Create Response

- `AutomationCreateResponse object { id, createdAt, description, 10 more }`

  - `id: string`

    Unique identifier of the automation.

  - `createdAt: string`

    When the automation was created.

  - `description: string`

    What the automation is meant to accomplish.

  - `lastFailureAt: string`

    When its most recent failed run ended, test runs included; null if no run has failed.

  - `lastRunAt: string`

    When its most recent run started, test runs included; null before the first run.

  - `model: string`

    Model the agent steps run on.

  - `name: string`

    Display name of the automation.

  - `objectType: "automation"`

    Always `automation`.

    - `"automation"`

  - `runAs: object { type }  or object { memberId, type }  or object { type }`

    Who the automation acts as.

    - `WorkspaceRunAs object { type }`

      Runs with no acting member.

      - `type: "WORKSPACE"`

        - `"WORKSPACE"`

    - `MemberRunAs object { memberId, type }`

      - `memberId: string`

        Member the automation runs as.

      - `type: "MEMBER"`

        - `"MEMBER"`

    - `FromInputRunAs object { type }`

      The acting member is read from an input when a run starts. Set in the Lightfield app.

      - `type: "FROM_INPUT"`

        - `"FROM_INPUT"`

  - `status: "ACTIVE" or "PAUSED"`

    `PAUSED` automations keep their triggers but start no runs.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `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 }`

      - `id: string`

        Step identifier. Assigned by Lightfield.

      - `name: string`

        Display name of the step.

      - `prompt: string`

        Instructions the agent follows in this step.

      - `type: "AGENT"`

        - `"AGENT"`

      - `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.

        - `ToolPermission object { name, type, reason }`

          - `name: string`

            Name of the tool, matching the Lightfield app.

          - `type: "TOOL"`

            - `"TOOL"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

        - `McpPermission object { connector, tools, type, reason }`

          - `connector: string`

            Connector the tools are on. Must already be lowercase and trimmed.

          - `tools: array of string`

            Unique, trimmed names of the connector tools the step may call.

          - `type: "MCP"`

            - `"MCP"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

        - `APIPermission object { scopes, type, reason }`

          - `scopes: array of string`

            Lightfield API scopes the step may use, for example `contacts:read`. The API key must hold every scope it grants, and only a full-access key may grant `*`.

          - `type: "API"`

            - `"API"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

        - `NetworkPermission object { domain, type, headers, 2 more }`

          - `domain: string`

            Lowercase host the step may call, optionally followed by a path glob. Returns 422 for a scheme, query, fragment or surrounding whitespace.

          - `type: "NETWORK"`

            - `"NETWORK"`

          - `headers: optional map[string]`

            Headers added to every request this permission allows.

          - `method: optional "GET" or "POST" or "PUT" or 2 more`

            Restricts the permission to one HTTP method.

            - `"GET"`

            - `"POST"`

            - `"PUT"`

            - `"PATCH"`

            - `"DELETE"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

    - `CodeStep object { id, command, name, 3 more }`

      - `id: string`

        Step identifier. Assigned by Lightfield.

      - `command: string`

        Bash command the step runs as written.

      - `name: string`

        Display name of the step.

      - `type: "CODE"`

        - `"CODE"`

      - `description: optional string`

        What the command does. Does not change what runs.

      - `permissions: optional array of object { scopes, type, reason }  or object { domain, type, headers, 2 more }`

        What the command may use. Defaults to none.

        - `APIPermission object { scopes, type, reason }`

          - `scopes: array of string`

            Lightfield API scopes the step may use, for example `contacts:read`. The API key must hold every scope it grants, and only a full-access key may grant `*`.

          - `type: "API"`

            - `"API"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

        - `NetworkPermission object { domain, type, headers, 2 more }`

          - `domain: string`

            Lowercase host the step may call, optionally followed by a path glob. Returns 422 for a scheme, query, fragment or surrounding whitespace.

          - `type: "NETWORK"`

            - `"NETWORK"`

          - `headers: optional map[string]`

            Headers added to every request this permission allows.

          - `method: optional "GET" or "POST" or "PUT" or 2 more`

            Restricts the permission to one HTTP method.

            - `"GET"`

            - `"POST"`

            - `"PUT"`

            - `"PATCH"`

            - `"DELETE"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

    - `SleepStep object { id, duration, name, 2 more }`

      - `id: string`

        Step identifier. Assigned by Lightfield.

      - `duration: number or string`

        How long to sleep before the next step, at most one year.

        - `number`

        - `string`

      - `name: string`

        Display name of the step.

      - `type: "SLEEP"`

        - `"SLEEP"`

      - `unit: "MILLISECOND" or "SECOND" or "MINUTE" or 2 more`

        Unit of `duration`.

        - `"MILLISECOND"`

        - `"SECOND"`

        - `"MINUTE"`

        - `"HOUR"`

        - `"DAY"`

  - `triggers: array of object { type }  or object { type, url, exampleResult }  or object { schedule, type }  or 3 more`

    - `ManualTrigger object { type }`

      - `type: "MANUAL"`

        - `"MANUAL"`

    - `WebhookTrigger object { type, url, exampleResult }`

      - `type: "WEBHOOK"`

        - `"WEBHOOK"`

      - `url: string`

        URL that starts a run when it receives a POST request.

      - `exampleResult: optional object { json, parsed }`

        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`

          - `map[string or number or boolean or 2 more]`

            - `string`

            - `number`

            - `boolean`

            - `array of string or number or boolean or 2 more`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

            - `map[string or number or boolean or 2 more]`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

          - `array of string or number or boolean or 2 more`

            - `string`

            - `number`

            - `boolean`

            - `array of string or number or boolean or 2 more`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

            - `map[string or number or boolean or 2 more]`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

        - `parsed: array of object { path, label, value }`

          - `path: array of string`

          - `label: optional string`

          - `value: optional string or number or boolean or 2 more`

            - `string`

            - `number`

            - `boolean`

            - `array of string or number or boolean or 2 more`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

            - `map[string or number or boolean or 2 more]`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

    - `ScheduledTrigger object { schedule, type }`

      - `schedule: object { cron, timezone }`

        - `cron: string`

          Cron expression: 5 fields, 6 with a leading seconds field, or a macro such as `@daily`. For example `0 9 * * 1-5`.

        - `timezone: string`

          IANA timezone the cron is evaluated in.

      - `type: "SCHEDULED"`

        - `"SCHEDULED"`

    - `RecordCreatedTrigger object { objectType, type }`

      - `objectType: string`

      - `type: "RECORD_CREATED"`

        - `"RECORD_CREATED"`

    - `RecordUpdatedTrigger object { objectType, type, watchedFields, watchedRelationships }`

      - `objectType: string`

      - `type: "RECORD_UPDATED"`

        - `"RECORD_UPDATED"`

      - `watchedFields: array of string`

      - `watchedRelationships: optional array of object { direction, key }`

        - `direction: "SOURCE" or "DESTINATION"`

          The endpoint occupied by the record whose changes start the run.

          - `"SOURCE"`

          - `"DESTINATION"`

        - `key: string`

          Public relationship key, such as `$contact` or a custom relationship slug.

    - `SequenceReplyTrigger object { type }`

      - `type: "SEQUENCE_REPLY"`

        - `"SEQUENCE_REPLY"`

  - `updatedAt: string`

    When the automation was last changed.

### Automation Delete Response

- `AutomationDeleteResponse object { id, deleted, objectType }`

  - `id: string`

  - `deleted: boolean`

    Always `true`.

  - `objectType: "automation"`

    - `"automation"`

### Automation List Response

- `AutomationListResponse object { data, object, totalCount }`

  - `data: array of object { id, createdAt, description, 8 more }`

    - `id: string`

      Unique identifier of the automation.

    - `createdAt: string`

      When the automation was created.

    - `description: string`

      What the automation is meant to accomplish.

    - `lastFailureAt: string`

      When its most recent failed run ended, test runs included; null if no run has failed.

    - `lastRunAt: string`

      When its most recent run started, test runs included; null before the first run.

    - `name: string`

      Display name of the automation.

    - `objectType: "automation"`

      Always `automation`.

      - `"automation"`

    - `status: "ACTIVE" or "PAUSED"`

      `PAUSED` automations keep their triggers but start no runs.

      - `"ACTIVE"`

      - `"PAUSED"`

    - `stepCount: number`

      How many steps a run has.

    - `triggerTypes: array of "MANUAL" or "WEBHOOK" or "SCHEDULED" or 3 more`

      The kinds of trigger that start a run, each listed once.

      - `"MANUAL"`

      - `"WEBHOOK"`

      - `"SCHEDULED"`

      - `"RECORD_CREATED"`

      - `"RECORD_UPDATED"`

      - `"SEQUENCE_REPLY"`

    - `updatedAt: string`

      When the automation was last changed.

  - `object: "list"`

    - `"list"`

  - `totalCount: number`

### Automation Pause Response

- `AutomationPauseResponse object { id, createdAt, description, 10 more }`

  - `id: string`

    Unique identifier of the automation.

  - `createdAt: string`

    When the automation was created.

  - `description: string`

    What the automation is meant to accomplish.

  - `lastFailureAt: string`

    When its most recent failed run ended, test runs included; null if no run has failed.

  - `lastRunAt: string`

    When its most recent run started, test runs included; null before the first run.

  - `model: string`

    Model the agent steps run on.

  - `name: string`

    Display name of the automation.

  - `objectType: "automation"`

    Always `automation`.

    - `"automation"`

  - `runAs: object { type }  or object { memberId, type }  or object { type }`

    Who the automation acts as.

    - `WorkspaceRunAs object { type }`

      Runs with no acting member.

      - `type: "WORKSPACE"`

        - `"WORKSPACE"`

    - `MemberRunAs object { memberId, type }`

      - `memberId: string`

        Member the automation runs as.

      - `type: "MEMBER"`

        - `"MEMBER"`

    - `FromInputRunAs object { type }`

      The acting member is read from an input when a run starts. Set in the Lightfield app.

      - `type: "FROM_INPUT"`

        - `"FROM_INPUT"`

  - `status: "ACTIVE" or "PAUSED"`

    `PAUSED` automations keep their triggers but start no runs.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `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 }`

      - `id: string`

        Step identifier. Assigned by Lightfield.

      - `name: string`

        Display name of the step.

      - `prompt: string`

        Instructions the agent follows in this step.

      - `type: "AGENT"`

        - `"AGENT"`

      - `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.

        - `ToolPermission object { name, type, reason }`

          - `name: string`

            Name of the tool, matching the Lightfield app.

          - `type: "TOOL"`

            - `"TOOL"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

        - `McpPermission object { connector, tools, type, reason }`

          - `connector: string`

            Connector the tools are on. Must already be lowercase and trimmed.

          - `tools: array of string`

            Unique, trimmed names of the connector tools the step may call.

          - `type: "MCP"`

            - `"MCP"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

        - `APIPermission object { scopes, type, reason }`

          - `scopes: array of string`

            Lightfield API scopes the step may use, for example `contacts:read`. The API key must hold every scope it grants, and only a full-access key may grant `*`.

          - `type: "API"`

            - `"API"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

        - `NetworkPermission object { domain, type, headers, 2 more }`

          - `domain: string`

            Lowercase host the step may call, optionally followed by a path glob. Returns 422 for a scheme, query, fragment or surrounding whitespace.

          - `type: "NETWORK"`

            - `"NETWORK"`

          - `headers: optional map[string]`

            Headers added to every request this permission allows.

          - `method: optional "GET" or "POST" or "PUT" or 2 more`

            Restricts the permission to one HTTP method.

            - `"GET"`

            - `"POST"`

            - `"PUT"`

            - `"PATCH"`

            - `"DELETE"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

    - `CodeStep object { id, command, name, 3 more }`

      - `id: string`

        Step identifier. Assigned by Lightfield.

      - `command: string`

        Bash command the step runs as written.

      - `name: string`

        Display name of the step.

      - `type: "CODE"`

        - `"CODE"`

      - `description: optional string`

        What the command does. Does not change what runs.

      - `permissions: optional array of object { scopes, type, reason }  or object { domain, type, headers, 2 more }`

        What the command may use. Defaults to none.

        - `APIPermission object { scopes, type, reason }`

          - `scopes: array of string`

            Lightfield API scopes the step may use, for example `contacts:read`. The API key must hold every scope it grants, and only a full-access key may grant `*`.

          - `type: "API"`

            - `"API"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

        - `NetworkPermission object { domain, type, headers, 2 more }`

          - `domain: string`

            Lowercase host the step may call, optionally followed by a path glob. Returns 422 for a scheme, query, fragment or surrounding whitespace.

          - `type: "NETWORK"`

            - `"NETWORK"`

          - `headers: optional map[string]`

            Headers added to every request this permission allows.

          - `method: optional "GET" or "POST" or "PUT" or 2 more`

            Restricts the permission to one HTTP method.

            - `"GET"`

            - `"POST"`

            - `"PUT"`

            - `"PATCH"`

            - `"DELETE"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

    - `SleepStep object { id, duration, name, 2 more }`

      - `id: string`

        Step identifier. Assigned by Lightfield.

      - `duration: number or string`

        How long to sleep before the next step, at most one year.

        - `number`

        - `string`

      - `name: string`

        Display name of the step.

      - `type: "SLEEP"`

        - `"SLEEP"`

      - `unit: "MILLISECOND" or "SECOND" or "MINUTE" or 2 more`

        Unit of `duration`.

        - `"MILLISECOND"`

        - `"SECOND"`

        - `"MINUTE"`

        - `"HOUR"`

        - `"DAY"`

  - `triggers: array of object { type }  or object { type, url, exampleResult }  or object { schedule, type }  or 3 more`

    - `ManualTrigger object { type }`

      - `type: "MANUAL"`

        - `"MANUAL"`

    - `WebhookTrigger object { type, url, exampleResult }`

      - `type: "WEBHOOK"`

        - `"WEBHOOK"`

      - `url: string`

        URL that starts a run when it receives a POST request.

      - `exampleResult: optional object { json, parsed }`

        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`

          - `map[string or number or boolean or 2 more]`

            - `string`

            - `number`

            - `boolean`

            - `array of string or number or boolean or 2 more`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

            - `map[string or number or boolean or 2 more]`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

          - `array of string or number or boolean or 2 more`

            - `string`

            - `number`

            - `boolean`

            - `array of string or number or boolean or 2 more`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

            - `map[string or number or boolean or 2 more]`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

        - `parsed: array of object { path, label, value }`

          - `path: array of string`

          - `label: optional string`

          - `value: optional string or number or boolean or 2 more`

            - `string`

            - `number`

            - `boolean`

            - `array of string or number or boolean or 2 more`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

            - `map[string or number or boolean or 2 more]`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

    - `ScheduledTrigger object { schedule, type }`

      - `schedule: object { cron, timezone }`

        - `cron: string`

          Cron expression: 5 fields, 6 with a leading seconds field, or a macro such as `@daily`. For example `0 9 * * 1-5`.

        - `timezone: string`

          IANA timezone the cron is evaluated in.

      - `type: "SCHEDULED"`

        - `"SCHEDULED"`

    - `RecordCreatedTrigger object { objectType, type }`

      - `objectType: string`

      - `type: "RECORD_CREATED"`

        - `"RECORD_CREATED"`

    - `RecordUpdatedTrigger object { objectType, type, watchedFields, watchedRelationships }`

      - `objectType: string`

      - `type: "RECORD_UPDATED"`

        - `"RECORD_UPDATED"`

      - `watchedFields: array of string`

      - `watchedRelationships: optional array of object { direction, key }`

        - `direction: "SOURCE" or "DESTINATION"`

          The endpoint occupied by the record whose changes start the run.

          - `"SOURCE"`

          - `"DESTINATION"`

        - `key: string`

          Public relationship key, such as `$contact` or a custom relationship slug.

    - `SequenceReplyTrigger object { type }`

      - `type: "SEQUENCE_REPLY"`

        - `"SEQUENCE_REPLY"`

  - `updatedAt: string`

    When the automation was last changed.

### Automation Resume Response

- `AutomationResumeResponse object { id, createdAt, description, 10 more }`

  - `id: string`

    Unique identifier of the automation.

  - `createdAt: string`

    When the automation was created.

  - `description: string`

    What the automation is meant to accomplish.

  - `lastFailureAt: string`

    When its most recent failed run ended, test runs included; null if no run has failed.

  - `lastRunAt: string`

    When its most recent run started, test runs included; null before the first run.

  - `model: string`

    Model the agent steps run on.

  - `name: string`

    Display name of the automation.

  - `objectType: "automation"`

    Always `automation`.

    - `"automation"`

  - `runAs: object { type }  or object { memberId, type }  or object { type }`

    Who the automation acts as.

    - `WorkspaceRunAs object { type }`

      Runs with no acting member.

      - `type: "WORKSPACE"`

        - `"WORKSPACE"`

    - `MemberRunAs object { memberId, type }`

      - `memberId: string`

        Member the automation runs as.

      - `type: "MEMBER"`

        - `"MEMBER"`

    - `FromInputRunAs object { type }`

      The acting member is read from an input when a run starts. Set in the Lightfield app.

      - `type: "FROM_INPUT"`

        - `"FROM_INPUT"`

  - `status: "ACTIVE" or "PAUSED"`

    `PAUSED` automations keep their triggers but start no runs.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `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 }`

      - `id: string`

        Step identifier. Assigned by Lightfield.

      - `name: string`

        Display name of the step.

      - `prompt: string`

        Instructions the agent follows in this step.

      - `type: "AGENT"`

        - `"AGENT"`

      - `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.

        - `ToolPermission object { name, type, reason }`

          - `name: string`

            Name of the tool, matching the Lightfield app.

          - `type: "TOOL"`

            - `"TOOL"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

        - `McpPermission object { connector, tools, type, reason }`

          - `connector: string`

            Connector the tools are on. Must already be lowercase and trimmed.

          - `tools: array of string`

            Unique, trimmed names of the connector tools the step may call.

          - `type: "MCP"`

            - `"MCP"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

        - `APIPermission object { scopes, type, reason }`

          - `scopes: array of string`

            Lightfield API scopes the step may use, for example `contacts:read`. The API key must hold every scope it grants, and only a full-access key may grant `*`.

          - `type: "API"`

            - `"API"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

        - `NetworkPermission object { domain, type, headers, 2 more }`

          - `domain: string`

            Lowercase host the step may call, optionally followed by a path glob. Returns 422 for a scheme, query, fragment or surrounding whitespace.

          - `type: "NETWORK"`

            - `"NETWORK"`

          - `headers: optional map[string]`

            Headers added to every request this permission allows.

          - `method: optional "GET" or "POST" or "PUT" or 2 more`

            Restricts the permission to one HTTP method.

            - `"GET"`

            - `"POST"`

            - `"PUT"`

            - `"PATCH"`

            - `"DELETE"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

    - `CodeStep object { id, command, name, 3 more }`

      - `id: string`

        Step identifier. Assigned by Lightfield.

      - `command: string`

        Bash command the step runs as written.

      - `name: string`

        Display name of the step.

      - `type: "CODE"`

        - `"CODE"`

      - `description: optional string`

        What the command does. Does not change what runs.

      - `permissions: optional array of object { scopes, type, reason }  or object { domain, type, headers, 2 more }`

        What the command may use. Defaults to none.

        - `APIPermission object { scopes, type, reason }`

          - `scopes: array of string`

            Lightfield API scopes the step may use, for example `contacts:read`. The API key must hold every scope it grants, and only a full-access key may grant `*`.

          - `type: "API"`

            - `"API"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

        - `NetworkPermission object { domain, type, headers, 2 more }`

          - `domain: string`

            Lowercase host the step may call, optionally followed by a path glob. Returns 422 for a scheme, query, fragment or surrounding whitespace.

          - `type: "NETWORK"`

            - `"NETWORK"`

          - `headers: optional map[string]`

            Headers added to every request this permission allows.

          - `method: optional "GET" or "POST" or "PUT" or 2 more`

            Restricts the permission to one HTTP method.

            - `"GET"`

            - `"POST"`

            - `"PUT"`

            - `"PATCH"`

            - `"DELETE"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

    - `SleepStep object { id, duration, name, 2 more }`

      - `id: string`

        Step identifier. Assigned by Lightfield.

      - `duration: number or string`

        How long to sleep before the next step, at most one year.

        - `number`

        - `string`

      - `name: string`

        Display name of the step.

      - `type: "SLEEP"`

        - `"SLEEP"`

      - `unit: "MILLISECOND" or "SECOND" or "MINUTE" or 2 more`

        Unit of `duration`.

        - `"MILLISECOND"`

        - `"SECOND"`

        - `"MINUTE"`

        - `"HOUR"`

        - `"DAY"`

  - `triggers: array of object { type }  or object { type, url, exampleResult }  or object { schedule, type }  or 3 more`

    - `ManualTrigger object { type }`

      - `type: "MANUAL"`

        - `"MANUAL"`

    - `WebhookTrigger object { type, url, exampleResult }`

      - `type: "WEBHOOK"`

        - `"WEBHOOK"`

      - `url: string`

        URL that starts a run when it receives a POST request.

      - `exampleResult: optional object { json, parsed }`

        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`

          - `map[string or number or boolean or 2 more]`

            - `string`

            - `number`

            - `boolean`

            - `array of string or number or boolean or 2 more`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

            - `map[string or number or boolean or 2 more]`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

          - `array of string or number or boolean or 2 more`

            - `string`

            - `number`

            - `boolean`

            - `array of string or number or boolean or 2 more`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

            - `map[string or number or boolean or 2 more]`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

        - `parsed: array of object { path, label, value }`

          - `path: array of string`

          - `label: optional string`

          - `value: optional string or number or boolean or 2 more`

            - `string`

            - `number`

            - `boolean`

            - `array of string or number or boolean or 2 more`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

            - `map[string or number or boolean or 2 more]`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

    - `ScheduledTrigger object { schedule, type }`

      - `schedule: object { cron, timezone }`

        - `cron: string`

          Cron expression: 5 fields, 6 with a leading seconds field, or a macro such as `@daily`. For example `0 9 * * 1-5`.

        - `timezone: string`

          IANA timezone the cron is evaluated in.

      - `type: "SCHEDULED"`

        - `"SCHEDULED"`

    - `RecordCreatedTrigger object { objectType, type }`

      - `objectType: string`

      - `type: "RECORD_CREATED"`

        - `"RECORD_CREATED"`

    - `RecordUpdatedTrigger object { objectType, type, watchedFields, watchedRelationships }`

      - `objectType: string`

      - `type: "RECORD_UPDATED"`

        - `"RECORD_UPDATED"`

      - `watchedFields: array of string`

      - `watchedRelationships: optional array of object { direction, key }`

        - `direction: "SOURCE" or "DESTINATION"`

          The endpoint occupied by the record whose changes start the run.

          - `"SOURCE"`

          - `"DESTINATION"`

        - `key: string`

          Public relationship key, such as `$contact` or a custom relationship slug.

    - `SequenceReplyTrigger object { type }`

      - `type: "SEQUENCE_REPLY"`

        - `"SEQUENCE_REPLY"`

  - `updatedAt: string`

    When the automation was last changed.

### Automation Retrieve Response

- `AutomationRetrieveResponse object { id, createdAt, description, 10 more }`

  - `id: string`

    Unique identifier of the automation.

  - `createdAt: string`

    When the automation was created.

  - `description: string`

    What the automation is meant to accomplish.

  - `lastFailureAt: string`

    When its most recent failed run ended, test runs included; null if no run has failed.

  - `lastRunAt: string`

    When its most recent run started, test runs included; null before the first run.

  - `model: string`

    Model the agent steps run on.

  - `name: string`

    Display name of the automation.

  - `objectType: "automation"`

    Always `automation`.

    - `"automation"`

  - `runAs: object { type }  or object { memberId, type }  or object { type }`

    Who the automation acts as.

    - `WorkspaceRunAs object { type }`

      Runs with no acting member.

      - `type: "WORKSPACE"`

        - `"WORKSPACE"`

    - `MemberRunAs object { memberId, type }`

      - `memberId: string`

        Member the automation runs as.

      - `type: "MEMBER"`

        - `"MEMBER"`

    - `FromInputRunAs object { type }`

      The acting member is read from an input when a run starts. Set in the Lightfield app.

      - `type: "FROM_INPUT"`

        - `"FROM_INPUT"`

  - `status: "ACTIVE" or "PAUSED"`

    `PAUSED` automations keep their triggers but start no runs.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `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 }`

      - `id: string`

        Step identifier. Assigned by Lightfield.

      - `name: string`

        Display name of the step.

      - `prompt: string`

        Instructions the agent follows in this step.

      - `type: "AGENT"`

        - `"AGENT"`

      - `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.

        - `ToolPermission object { name, type, reason }`

          - `name: string`

            Name of the tool, matching the Lightfield app.

          - `type: "TOOL"`

            - `"TOOL"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

        - `McpPermission object { connector, tools, type, reason }`

          - `connector: string`

            Connector the tools are on. Must already be lowercase and trimmed.

          - `tools: array of string`

            Unique, trimmed names of the connector tools the step may call.

          - `type: "MCP"`

            - `"MCP"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

        - `APIPermission object { scopes, type, reason }`

          - `scopes: array of string`

            Lightfield API scopes the step may use, for example `contacts:read`. The API key must hold every scope it grants, and only a full-access key may grant `*`.

          - `type: "API"`

            - `"API"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

        - `NetworkPermission object { domain, type, headers, 2 more }`

          - `domain: string`

            Lowercase host the step may call, optionally followed by a path glob. Returns 422 for a scheme, query, fragment or surrounding whitespace.

          - `type: "NETWORK"`

            - `"NETWORK"`

          - `headers: optional map[string]`

            Headers added to every request this permission allows.

          - `method: optional "GET" or "POST" or "PUT" or 2 more`

            Restricts the permission to one HTTP method.

            - `"GET"`

            - `"POST"`

            - `"PUT"`

            - `"PATCH"`

            - `"DELETE"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

    - `CodeStep object { id, command, name, 3 more }`

      - `id: string`

        Step identifier. Assigned by Lightfield.

      - `command: string`

        Bash command the step runs as written.

      - `name: string`

        Display name of the step.

      - `type: "CODE"`

        - `"CODE"`

      - `description: optional string`

        What the command does. Does not change what runs.

      - `permissions: optional array of object { scopes, type, reason }  or object { domain, type, headers, 2 more }`

        What the command may use. Defaults to none.

        - `APIPermission object { scopes, type, reason }`

          - `scopes: array of string`

            Lightfield API scopes the step may use, for example `contacts:read`. The API key must hold every scope it grants, and only a full-access key may grant `*`.

          - `type: "API"`

            - `"API"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

        - `NetworkPermission object { domain, type, headers, 2 more }`

          - `domain: string`

            Lowercase host the step may call, optionally followed by a path glob. Returns 422 for a scheme, query, fragment or surrounding whitespace.

          - `type: "NETWORK"`

            - `"NETWORK"`

          - `headers: optional map[string]`

            Headers added to every request this permission allows.

          - `method: optional "GET" or "POST" or "PUT" or 2 more`

            Restricts the permission to one HTTP method.

            - `"GET"`

            - `"POST"`

            - `"PUT"`

            - `"PATCH"`

            - `"DELETE"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

    - `SleepStep object { id, duration, name, 2 more }`

      - `id: string`

        Step identifier. Assigned by Lightfield.

      - `duration: number or string`

        How long to sleep before the next step, at most one year.

        - `number`

        - `string`

      - `name: string`

        Display name of the step.

      - `type: "SLEEP"`

        - `"SLEEP"`

      - `unit: "MILLISECOND" or "SECOND" or "MINUTE" or 2 more`

        Unit of `duration`.

        - `"MILLISECOND"`

        - `"SECOND"`

        - `"MINUTE"`

        - `"HOUR"`

        - `"DAY"`

  - `triggers: array of object { type }  or object { type, url, exampleResult }  or object { schedule, type }  or 3 more`

    - `ManualTrigger object { type }`

      - `type: "MANUAL"`

        - `"MANUAL"`

    - `WebhookTrigger object { type, url, exampleResult }`

      - `type: "WEBHOOK"`

        - `"WEBHOOK"`

      - `url: string`

        URL that starts a run when it receives a POST request.

      - `exampleResult: optional object { json, parsed }`

        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`

          - `map[string or number or boolean or 2 more]`

            - `string`

            - `number`

            - `boolean`

            - `array of string or number or boolean or 2 more`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

            - `map[string or number or boolean or 2 more]`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

          - `array of string or number or boolean or 2 more`

            - `string`

            - `number`

            - `boolean`

            - `array of string or number or boolean or 2 more`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

            - `map[string or number or boolean or 2 more]`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

        - `parsed: array of object { path, label, value }`

          - `path: array of string`

          - `label: optional string`

          - `value: optional string or number or boolean or 2 more`

            - `string`

            - `number`

            - `boolean`

            - `array of string or number or boolean or 2 more`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

            - `map[string or number or boolean or 2 more]`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

    - `ScheduledTrigger object { schedule, type }`

      - `schedule: object { cron, timezone }`

        - `cron: string`

          Cron expression: 5 fields, 6 with a leading seconds field, or a macro such as `@daily`. For example `0 9 * * 1-5`.

        - `timezone: string`

          IANA timezone the cron is evaluated in.

      - `type: "SCHEDULED"`

        - `"SCHEDULED"`

    - `RecordCreatedTrigger object { objectType, type }`

      - `objectType: string`

      - `type: "RECORD_CREATED"`

        - `"RECORD_CREATED"`

    - `RecordUpdatedTrigger object { objectType, type, watchedFields, watchedRelationships }`

      - `objectType: string`

      - `type: "RECORD_UPDATED"`

        - `"RECORD_UPDATED"`

      - `watchedFields: array of string`

      - `watchedRelationships: optional array of object { direction, key }`

        - `direction: "SOURCE" or "DESTINATION"`

          The endpoint occupied by the record whose changes start the run.

          - `"SOURCE"`

          - `"DESTINATION"`

        - `key: string`

          Public relationship key, such as `$contact` or a custom relationship slug.

    - `SequenceReplyTrigger object { type }`

      - `type: "SEQUENCE_REPLY"`

        - `"SEQUENCE_REPLY"`

  - `updatedAt: string`

    When the automation was last changed.

### Automation Update Response

- `AutomationUpdateResponse object { id, createdAt, description, 10 more }`

  - `id: string`

    Unique identifier of the automation.

  - `createdAt: string`

    When the automation was created.

  - `description: string`

    What the automation is meant to accomplish.

  - `lastFailureAt: string`

    When its most recent failed run ended, test runs included; null if no run has failed.

  - `lastRunAt: string`

    When its most recent run started, test runs included; null before the first run.

  - `model: string`

    Model the agent steps run on.

  - `name: string`

    Display name of the automation.

  - `objectType: "automation"`

    Always `automation`.

    - `"automation"`

  - `runAs: object { type }  or object { memberId, type }  or object { type }`

    Who the automation acts as.

    - `WorkspaceRunAs object { type }`

      Runs with no acting member.

      - `type: "WORKSPACE"`

        - `"WORKSPACE"`

    - `MemberRunAs object { memberId, type }`

      - `memberId: string`

        Member the automation runs as.

      - `type: "MEMBER"`

        - `"MEMBER"`

    - `FromInputRunAs object { type }`

      The acting member is read from an input when a run starts. Set in the Lightfield app.

      - `type: "FROM_INPUT"`

        - `"FROM_INPUT"`

  - `status: "ACTIVE" or "PAUSED"`

    `PAUSED` automations keep their triggers but start no runs.

    - `"ACTIVE"`

    - `"PAUSED"`

  - `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 }`

      - `id: string`

        Step identifier. Assigned by Lightfield.

      - `name: string`

        Display name of the step.

      - `prompt: string`

        Instructions the agent follows in this step.

      - `type: "AGENT"`

        - `"AGENT"`

      - `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.

        - `ToolPermission object { name, type, reason }`

          - `name: string`

            Name of the tool, matching the Lightfield app.

          - `type: "TOOL"`

            - `"TOOL"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

        - `McpPermission object { connector, tools, type, reason }`

          - `connector: string`

            Connector the tools are on. Must already be lowercase and trimmed.

          - `tools: array of string`

            Unique, trimmed names of the connector tools the step may call.

          - `type: "MCP"`

            - `"MCP"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

        - `APIPermission object { scopes, type, reason }`

          - `scopes: array of string`

            Lightfield API scopes the step may use, for example `contacts:read`. The API key must hold every scope it grants, and only a full-access key may grant `*`.

          - `type: "API"`

            - `"API"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

        - `NetworkPermission object { domain, type, headers, 2 more }`

          - `domain: string`

            Lowercase host the step may call, optionally followed by a path glob. Returns 422 for a scheme, query, fragment or surrounding whitespace.

          - `type: "NETWORK"`

            - `"NETWORK"`

          - `headers: optional map[string]`

            Headers added to every request this permission allows.

          - `method: optional "GET" or "POST" or "PUT" or 2 more`

            Restricts the permission to one HTTP method.

            - `"GET"`

            - `"POST"`

            - `"PUT"`

            - `"PATCH"`

            - `"DELETE"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

    - `CodeStep object { id, command, name, 3 more }`

      - `id: string`

        Step identifier. Assigned by Lightfield.

      - `command: string`

        Bash command the step runs as written.

      - `name: string`

        Display name of the step.

      - `type: "CODE"`

        - `"CODE"`

      - `description: optional string`

        What the command does. Does not change what runs.

      - `permissions: optional array of object { scopes, type, reason }  or object { domain, type, headers, 2 more }`

        What the command may use. Defaults to none.

        - `APIPermission object { scopes, type, reason }`

          - `scopes: array of string`

            Lightfield API scopes the step may use, for example `contacts:read`. The API key must hold every scope it grants, and only a full-access key may grant `*`.

          - `type: "API"`

            - `"API"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

        - `NetworkPermission object { domain, type, headers, 2 more }`

          - `domain: string`

            Lowercase host the step may call, optionally followed by a path glob. Returns 422 for a scheme, query, fragment or surrounding whitespace.

          - `type: "NETWORK"`

            - `"NETWORK"`

          - `headers: optional map[string]`

            Headers added to every request this permission allows.

          - `method: optional "GET" or "POST" or "PUT" or 2 more`

            Restricts the permission to one HTTP method.

            - `"GET"`

            - `"POST"`

            - `"PUT"`

            - `"PATCH"`

            - `"DELETE"`

          - `reason: optional string`

            Why the step needs this permission. Null when none was given. Returns 422 for an empty or whitespace-only string.

    - `SleepStep object { id, duration, name, 2 more }`

      - `id: string`

        Step identifier. Assigned by Lightfield.

      - `duration: number or string`

        How long to sleep before the next step, at most one year.

        - `number`

        - `string`

      - `name: string`

        Display name of the step.

      - `type: "SLEEP"`

        - `"SLEEP"`

      - `unit: "MILLISECOND" or "SECOND" or "MINUTE" or 2 more`

        Unit of `duration`.

        - `"MILLISECOND"`

        - `"SECOND"`

        - `"MINUTE"`

        - `"HOUR"`

        - `"DAY"`

  - `triggers: array of object { type }  or object { type, url, exampleResult }  or object { schedule, type }  or 3 more`

    - `ManualTrigger object { type }`

      - `type: "MANUAL"`

        - `"MANUAL"`

    - `WebhookTrigger object { type, url, exampleResult }`

      - `type: "WEBHOOK"`

        - `"WEBHOOK"`

      - `url: string`

        URL that starts a run when it receives a POST request.

      - `exampleResult: optional object { json, parsed }`

        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`

          - `map[string or number or boolean or 2 more]`

            - `string`

            - `number`

            - `boolean`

            - `array of string or number or boolean or 2 more`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

            - `map[string or number or boolean or 2 more]`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

          - `array of string or number or boolean or 2 more`

            - `string`

            - `number`

            - `boolean`

            - `array of string or number or boolean or 2 more`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

            - `map[string or number or boolean or 2 more]`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

        - `parsed: array of object { path, label, value }`

          - `path: array of string`

          - `label: optional string`

          - `value: optional string or number or boolean or 2 more`

            - `string`

            - `number`

            - `boolean`

            - `array of string or number or boolean or 2 more`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

            - `map[string or number or boolean or 2 more]`

              - `string`

              - `number`

              - `boolean`

              - `array of JsonValue`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

              - `map[JsonValue]`

                - `string`

                - `number`

                - `boolean`

                - `array of unknown`

                - `unknown`

    - `ScheduledTrigger object { schedule, type }`

      - `schedule: object { cron, timezone }`

        - `cron: string`

          Cron expression: 5 fields, 6 with a leading seconds field, or a macro such as `@daily`. For example `0 9 * * 1-5`.

        - `timezone: string`

          IANA timezone the cron is evaluated in.

      - `type: "SCHEDULED"`

        - `"SCHEDULED"`

    - `RecordCreatedTrigger object { objectType, type }`

      - `objectType: string`

      - `type: "RECORD_CREATED"`

        - `"RECORD_CREATED"`

    - `RecordUpdatedTrigger object { objectType, type, watchedFields, watchedRelationships }`

      - `objectType: string`

      - `type: "RECORD_UPDATED"`

        - `"RECORD_UPDATED"`

      - `watchedFields: array of string`

      - `watchedRelationships: optional array of object { direction, key }`

        - `direction: "SOURCE" or "DESTINATION"`

          The endpoint occupied by the record whose changes start the run.

          - `"SOURCE"`

          - `"DESTINATION"`

        - `key: string`

          Public relationship key, such as `$contact` or a custom relationship slug.

    - `SequenceReplyTrigger object { type }`

      - `type: "SEQUENCE_REPLY"`

        - `"SEQUENCE_REPLY"`

  - `updatedAt: string`

    When the automation was last changed.
