---
title: "Get Workflow"
method: GET
path: "/api/workflows/{workflow_id}/"
tags: ["workflows"]
---

# Get Workflow

`GET /api/workflows/{workflow_id}/`

Get, update, or delete a workflow.

Drafts-on-demand resolution:
- GET returns the draft if one exists, else the latest committed version
  (404 when the family doesn't exist at all).
- PATCH edits the draft. When the family has no draft (committed-only),
  PATCH returns 409 — clients must create a draft first via
  POST /api/workflows/{workflow_id}/versions/.
- DELETE removes every version in the family.

Committing a draft is a separate action at
POST /api/workflows/{workflow_id}/commits/.

PUBLIC workflows resolve here by id on READS (toggle defaults on so by-id
reads stay toggle-free); WRITES scope to own rows only, so a public family
404s for non-staff instead of resolving into a mutation path. JWT writes
are additionally gated by ``check_object_permissions`` in ``get_object``.

## Path parameters

- `workflow_id` string, required

## Query parameters

- `is_exporting` boolean
- `is_including_secrets` boolean

## Headers

- `Authorization` string, required

## Response `200`

- union
  - WorkflowDetail — Computes family-level deployment state from committed versions. Lookup strategy (checked in order): 1. Queryset annotation (``_annotated_deployed_version``) — zero extra queries 2. Per-instance cache — avoids re-querying for same object 3. Per-workflow_id cache in serializer context — collapses versions list N→1 4. Direct database query
    - `id` string
    - `workflow_id` string — Logical workflow family key shared across versions
    - `version` integer
    - `name` string, nullable
    - `description` string, nullable
    - `type` 'automations' | 'monitors' | 'evaluators' | 'reports' | 'exports' | 'ingests' — * `automations` - Automation * `monitors` - Monitor * `evaluators` - Evaluator * `reports` - Report * `exports` - Export * `ingests` - Ingest
    - `trigger_event_type` union — Event type that triggers this workflow when used as an event responder * `request_log` - LOG_INGESTED * `trace_completed` - TRACE_COMPLETED * `customer_budget_limit_reached` - BUDGET_EXCEEDED * `credit_low_balance_threshold_reached` - CREDIT_LOW * `spend_cap_warning_threshold_reached` - SPEND_CAP_WARNING * `limit_policy_soft_triggered` - LIMIT_POLICY_SOFT_TRIGGERED * `limit_policy_hard_triggered` - LIMIT_POLICY_HARD_TRIGGERED * `on_eval_result_ingested` - EVAL_COMPLETED * `custom_event` - CUSTOM_EVENT * `eval_only` - EVAL_ONLY * `scheduled` - SCHEDULED
      - 'request_log' | 'trace_completed' | 'customer_budget_limit_reached' | 'credit_low_balance_threshold_reached' | 'spend_cap_warning_threshold_reached' | 'limit_policy_soft_triggered' | 'limit_policy_hard_triggered' | 'on_eval_result_ingested' | 'custom_event' | 'eval_only' | 'scheduled' — * `request_log` - LOG_INGESTED * `trace_completed` - TRACE_COMPLETED * `customer_budget_limit_reached` - BUDGET_EXCEEDED * `credit_low_balance_threshold_reached` - CREDIT_LOW * `spend_cap_warning_threshold_reached` - SPEND_CAP_WARNING * `limit_policy_soft_triggered` - LIMIT_POLICY_SOFT_TRIGGERED * `limit_policy_hard_triggered` - LIMIT_POLICY_HARD_TRIGGERED * `on_eval_result_ingested` - EVAL_COMPLETED * `custom_event` - CUSTOM_EVENT * `eval_only` - EVAL_ONLY * `scheduled` - SCHEDULED
      - ''
      - unknown
    - `schedule_cron` string, nullable — UTC cron schedule (5-field). Populated when trigger_event_type='scheduled'.
    - `is_enabled` boolean, required
    - `is_starred` boolean
    - `is_read_only` boolean — True for committed versions; only the latest version is editable
    - `is_public` boolean, required
    - `unique_organization_id` string, required
    - `tasks` WorkflowDetailTasksItems[], required
    - `graph` WorkflowDetailGraph, required
      - `node_count` integer
      - `edge_count` integer
      - `entry_nodes` string[]
      - `terminal_nodes` string[]
      - `nodes` object
    - `has_async_steps` boolean
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required
    - `deployed_version` integer, nullable, required
    - `tags` GenericTagDisplay[], required
      - `id` string, required
      - `name` string, required
      - `color` string, required
      - `created_at` string, date-time, required
      - `updated_at` string, date-time, required
  - WorkflowExport — Portable workflow export returned by the retrieve endpoint when ``is_exporting=true``: a ``schema_version`` envelope wrapping a sanitized ``workflow`` whose org-scoped resource ids are replaced with ``resource_ref`` placeholders so the workflow can be imported elsewhere.
    - `schema_version` string, required
    - `workflow` WorkflowExportWorkflow, required
      - `name` string, nullable
      - `description` string, nullable
      - `trigger_event_type` string, nullable
      - `schedule_cron` string, nullable
      - `is_enabled` boolean
      - `tasks` object[]

---

[API](https://skmtc.net/keywordsai/apis/api-reference.md) · [All operations](https://skmtc.net/keywordsai/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/keywordsai/api-reference/versions/c26d550029f8/schema)
