---
title: "Every automation, with the guardrails that bound it"
method: GET
path: "/api/v1/workflows"
tags: ["Dardaris"]
---

# Every automation, with the guardrails that bound it

`GET /api/v1/workflows`

## Request

- Base URL: `http://localhost:5180`
- URL: `http://localhost:5180/api/v1/workflows`
- Auth: API key in cookie `better-auth.session_token`

A workflow is a trigger, a set of conditions and the actions that follow, running at one of three trust levels: `auto` acts, `review` asks first, `notify` acts and tells you. `guardrails` is what the workflow may never exceed whatever its tier says: a spend cap, quiet hours, a run ceiling per record. Spend caps are integer cents. Both `hoursSaved` fields are deprecated: no record backs the estimate, nothing on screen reads it, and v2 drops it.

## Response `200`

Every workflow on file, and what the automation did lately.

- object
  - `ok` unknown, required
  - `data` object, required
    - `workflows` object[], required
      - `id` string, required: Stable record id, e.g. `lse_012`.
      - `key` string, required
      - `name` string, required
      - `description` string, required
      - `category` 'rent_collection' | 'arrears' | 'lease_lifecycle' | 'maintenance' | 'compliance' | 'move_in_out' | 'communication' | 'vacancy' | 'finance' | 'short_stay' | 'reporting', required
      - `enabled` boolean, required
      - `isSystem` boolean, required
      - `version` number: The catalogue version this row was written from. Absent reads as 1.
      - `fixed` boolean: A record of something the product always does, shown with no switch.
      - `offeredVersion` number: The catalogue version last offered to a row kept on the owner’s own steps, so each version is offered once.
      - `trigger` object, required
        - `kind` 'schedule' | 'event' | 'threshold' | 'date_offset' | 'manual', required
        - `schedule` string: A cron-ish descriptor such as `monthly:1` or `daily`.
        - `event` string
        - `anchor` string: The date field an offset trigger counts from.
        - `offsetDays` number
        - `metric` string
        - `operator` string
        - `value` number
      - `conditions` object[], required
        - `field` string, required: A dot path into the trigger context: `lease.type`, `arrears.daysOverdue`.
        - `operator` 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'not_in' | 'contains' | 'is_set' | 'is_empty' | 'before' | 'after', required
        - `value` union
          - string
          - number
          - boolean
          - union[]
            - union
              - …
        - `label` string, required: The condition in the owner’s words, so a workflow reads as a sentence.
      - `actions` object[], required
        - `id` string, required: Stable record id, e.g. `lse_012`.
        - `kind` string, required: `send_message`, `create_work_order`, `apply_indexation`, `request_approval` and the rest.
        - `label` string, required
        - `params` object, required: The action’s own payload: template, channel, amounts, offsets.
        - `tier` 'auto' | 'review' | 'notify': Overrides the workflow tier for this step alone. It may only tighten it.
        - `conditions` object[]
          - `field` string, required: A dot path into the trigger context: `lease.type`, `arrears.daysOverdue`.
          - `operator` 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'not_in' | 'contains' | 'is_set' | 'is_empty' | 'before' | 'after', required
          - `value` union
            - string
            - number
            - boolean
            - union[]
              - …
          - `label` string, required: The condition in the owner’s words, so a workflow reads as a sentence.
        - `delayDays` number
      - `tier` 'auto' | 'review' | 'notify', required: The trust level an automation runs at: act, ask first, or act and tell you.
      - `guardrails` object, required
        - `spendCap` integer: Above this the workflow always asks, whatever its tier says.
        - `quietHours` object: A tenant is never contacted outside these hours.
          - `from` string, required
          - `to` string, required
        - `maxRunsPerEntity` number: Runs allowed per record per window, so automation cannot turn into spam.
        - `windowDays` number
        - `respectHandlingFlags` boolean, required: Skip anyone flagged as vulnerable, escalated or do-not-automate.
      - `appliesTo` object
        - `unitModes` string[]
        - `leaseTypes` string[]
        - `buildingIds` string[]
      - `stats` object, required
        - `runsTotal` number, required
        - `runsLast30d` number, required
        - `approvalsRequested` number, required
        - `approvalsRejected` number, required
        - `hoursSaved` number, required: Estimated owner-hours this workflow saved. Deprecated: no record backs the estimate and v2 drops it.
        - `lastRunAt` string: ISO 8601 timestamp.
      - `createdAt` string, required: ISO 8601 timestamp.
      - `updatedAt` string, required: ISO 8601 timestamp.
    - `digest` object, required: What the automation actually did lately, so a rule can be read next to its record.
      - `today` number, required
      - `last7d` number, required
      - `hoursSaved` number, required: Estimated owner-hours saved, summed across every workflow. Deprecated: no record backs the estimate and v2 drops it. Nothing on screen reads it.
      - `recent` object[], required
        - `id` string, required: Stable record id, e.g. `lse_012`.
        - `at` string, required: ISO 8601 timestamp.
        - `action` string, required: `lease.indexed`, `message.sent`, `approval.rejected`…
        - `summary` string, required: Human-readable. Every action the AI takes leaves one.
        - `entity` object, required
          - `kind` string, required: Which kind of record this points at, for example `lease`, `unit` or `invoice`.
          - `id` string, required: Stable record id, e.g. `lse_012`.
          - `label` string, required: How the record reads to a person, so a trail can be followed without a second lookup.
        - `workflowRunId` string: Stable record id, e.g. `lse_012`.
        - `severity` string, required
      - `runs` object[], required
        - `id` string, required: Stable record id, e.g. `lse_012`.
        - `workflowId` string, required: Stable record id, e.g. `lse_012`.
        - `startedAt` string, required: ISO 8601 timestamp.
        - `finishedAt` string: ISO 8601 timestamp.
        - `status` 'running' | 'awaiting_approval' | 'completed' | 'failed' | 'skipped' | 'cancelled', required
        - `subject` object, required: The record the run was about, which is what triggered it.
          - `kind` string, required: Which kind of record this points at, for example `lease`, `unit` or `invoice`.
          - `id` string, required: Stable record id, e.g. `lse_012`.
          - `label` string, required: How the record reads to a person, so a trail can be followed without a second lookup.
        - `triggerSummary` string, required
        - `steps` object[], required
          - `actionId` string, required: Stable record id, e.g. `lse_012`.
          - `kind` string, required
          - `label` string, required
          - `status` 'pending' | 'awaiting_approval' | 'done' | 'skipped' | 'failed', required
          - `at` string: ISO 8601 timestamp.
          - `produced` object[]: What this step created, so the trail stays navigable.
            - `kind` string, required: Which kind of record this points at, for example `lease`, `unit` or `invoice`.
            - `id` string, required: Stable record id, e.g. `lse_012`.
            - `label` string, required: How the record reads to a person, so a trail can be followed without a second lookup.
          - `detail` string
          - `skipReason` string: Why a step was skipped. Saying what stopped and why is the whole trust proposition.
        - `approvalRequestId` string: Stable record id, e.g. `lse_012`.
        - `error` string
        - `summary` string, required: One owner-readable line for the activity feed.
      - `headline` string, required: One line, in Dardaris’s own voice.
  - `meta` object, required
    - `requestId` string, required: Echoed in the x-request-id header. Quote it in a bug report.

---

[API](https://skmtc.dev/dardaris/apis/dardaris-api.md) · [All operations](https://skmtc.dev/dardaris/apis/dardaris-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dardaris/apis/dardaris-api/revisions/4aff33835c73?raw)
