---
title: "run flow preview"
method: POST
path: "/w/{workspace}/jobs/run/preview_flow"
tags: ["job"]
---

# run flow preview

`POST /w/{workspace}/jobs/run/preview_flow`

## Path parameters

- `workspace` string, required

## Query parameters

- `include_header` string
- `invisible_to_owner` boolean
- `job_id` string, uuid
- `memory_id` string, uuid

## Request body

- FlowPreview
  - `value` FlowValue, required — unresolved $ref
  - `path` string
  - `args` ScriptArgs, required — The arguments to pass to the script or flow
  - `tag` string
  - `restarted_from` RestartedFrom
    - `flow_job_id` string, uuid
    - `step_id` string
    - `branch_or_iteration_n` integer — 0-based iteration index for ForLoop / branch index for BranchAll. Iterations 0..n-1 are preserved; iteration n is restarted.
    - `flow_version` integer
    - `branch_chosen` object — For BranchOne nested restart — the branch that was originally chosen, used to lock branch evaluation.
      - `type` 'default' | 'branch'
      - `branch` integer
    - `nested` RestartedFrom — recursive
  - `temp_script_refs` object, nullable — Map of relative-import script path -> temp storage hash, propagated to each flow step so inline-script relative imports resolve from not-yet-deployed local content instead of the deployed script

## Response `201`

job created

---

[API](https://skmtc.net/windmill/apis/windmill-api.md) · [All operations](https://skmtc.net/windmill/apis/windmill-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/windmill/windmill-api/revisions/063a4e2b46d8/schema)
