> This page is for Postman Docs, version Latest (v12) (default).
> For other versions, use one of these documentation indexes:
> - Latest (v12) (default): https://learning.postman.com/latest-v-12/llms.txt
> - v11: https://learning.postman.com/v11/llms.txt

> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://learning.postman.com/llms.txt.

# Postman CLI flows commands `(postman flows)`

> List, trigger, deploy, run, update, and delete Postman Flows, and view run history, using flows commands.

This topic covers flows management commands for the [Postman CLI](/docs/postman-cli/postman-cli-overview/). You can use the `postman flows` commands to run, manage, and analyze flows.

## `postman flows list`

The `postman flows list` command lists the flows available in a workspace. Specify the workspace by its ID.

> **Info**
>
> To use this command, sign in to Postman with [the `postman login` command](/docs/postman-cli/postman-cli-auth/#postman-login).

### Usage

```bash
postman flows list --workspace <workspace-id>
```

### Options

**`-w, --workspace [workspace-id]`**

Specifies the workspace by its ID. This option is required for the `postman flows list` command.

---

**`-f, --filter <pattern>`**

Filters flows by name. The pattern can be a regex or a name prefix.

---

**`-p, --paginate`**

Paginates the list of flows.

---

**`-s, --sort <criteria>`** `'updated' | 'name'` — default: updated

Sorts the listed flows. Accepts `name` or `updated`.

---

### Example

```bash
postman flows list --workspace ab12a1bb-1a12-1234-123a-123ab1234a1a

postman flows list --workspace ab12a1bb-1a12-1234-123a-123ab1234a1a --filter "API" --sort name --paginate
```

## `postman flows create`

The `postman flows create` command creates a flow in the current repository. Run it from the root of a repository that's connected to a Postman workspace.

### Usage

```bash
postman flows create [options]
```

### Options

**`-n, --name <name>`** — default: New flow

Specifies the flow's name.

---

**`--verbose`**

Accepted for consistency with the other flows commands. The `postman flows create` command prints no extra output with it.

---

**`--debug`**

Accepted for consistency with the other flows commands. The `postman flows create` command prints no extra output with it.

---

**`--json`**

Return the results in JSON format.

---

### Examples

```bash
postman flows create

postman flows create --name "Order sync"
```

## `postman flows trigger`

You can use the `postman flows trigger` command to trigger a [deployed](/flows/reference/flows-actions-overview/) flow to run. The deployed flow must have a [request trigger](/flows/reference/blocks/request/). This command requires the flow's ID as an argument. You can also assign values to the flow's inputs with the `--input` option.

> **Info**
>
> To use this command, sign in to Postman with [the `postman login` command](/docs/postman-cli/postman-cli-auth/#postman-login).

### Usage

```bash
postman flows trigger <flow-id> [options]
```

**`<flow-id>`**

The unique identifier of the flow to trigger.

---

### Options

**`-i, --input <key=value>`**

Set key=value pairs in the trigger payload (For example, `--input key=value --input baz=qux`).

---

**`-f, --input-file <path.json>`**

Set payload values from JSON files (For example, `--input-file ./inputs.json --input-file ./config.json`).

---

**`-q, --query <key=value>`**

Set query parameters as key=value pairs (For example, `--query key=value --query baz=qux`).

---

**`--headers <key=value>`**

Set custom headers as key=value pairs (For example, `--headers X-API-Key=12345 --headers User-Agent=MyApp`).

---

**`-n, --dry-run`** — default: false

Show the flow requestURL and payload that would be sent without making the actual request.

---

**`--show-secrets`** — default: false

Show actual authentication tokens in dry-run output (otherwise secrets are masked).

---

**`-r, --result`** — default: false

Show only the response body.

---

**`-s, --scenario <name>`**

Use a named scenario from the flow definition to construct the input payload, headers, and query parameters (overridden by --headers/--query)

---

**`--verbose`**

Verbose output

---

**`--debug`**

Debug output

---

**`--json`**

JSON output

---

### Example

```bash
postman flows trigger 12ab12a1ab123ab1234a1234
```

## `postman flows deploy`

You can use the `postman flows deploy` command to [deploy](/flows/build-flows/structure/actions/) a flow to the Postman Cloud. This command requires the flow's ID as an argument and the `--path` option. The `--path` option is the URL segment for the trigger, and must be unique for the team. For example, in the URL `deployed-flow.flows.pstmn.io/api/default/new-flow`, the path is `/new-flow`.

> **Info**
>
> To use this command, sign in to Postman with [the `postman login` command](/docs/postman-cli/postman-cli-auth/#postman-login).

### Usage

```bash
postman flows deploy <flow-id> --path <path>
```

**`<flow-id>`** — required

The unique identifier of the flow to deploy.

---

**`-p, --path <path>`** — required

Specifies the path that will be added to the domain where the flow is deployed.

---

**`-t, --timeout <timeout>`** — default: 10000ms

Sets the HTTP session timeout for the trigger, from `5000ms` to `60000ms`.

---

**`-a, --auth`** — default: false

Turns on authentication for the trigger.

---

**`--verbose`**

Show detailed logging information.

---

**`--debug`**

Debug output.

---

**`--json`**

Prints the result as JSON for machine-readable output.

---

### Example

```bash
postman flows deploy 12ab1ab1a1234567890a1234 --path deployed-flow-path
```

## `postman flows run`

This command runs a single flow from your local repo. The flow runs requests and logic blocks entirely locally on your machine, so you can run it from your terminal, in a CI/CD pipeline, or from a coding agent. Successful runs return status, output, and test results. The `postman flows run` command has options to set [input values](/flows/reference/blocks/start/#receive-data-with-inputs), show [run log](/flows/build-flows/troubleshoot/troubleshoot/#run-logs) information, and use values from a [scenario](/flows/build-flows/configure/scenarios/).

The flow's request blocks can send HTTP, GraphQL, and gRPC requests, each using its saved authentication and environment settings. GraphQL request blocks support queries and mutations, but not subscriptions. gRPC request blocks support unary methods, but not streaming methods, and return the response message, metadata, trailers, status, and assertions.

This command requires the local flow's file path as an argument. It also requires the `--workspace` option if your flow has a [connector block](/flows/reference/blocks/connector).

> **Note**
>
> The `postman flows run` command is available with [Postman Enterprise plans](https://www.postman.com/pricing/).

> **Info**
>
> To use this command, sign in to Postman with [the `postman login` command](/docs/postman-cli/postman-cli-auth/#postman-login).

The command reports its events to the API Catalog and Application Inventory by default. To turn this off, pass `--report-events=false`.

### Usage

```bash
postman flows run <flow-file-path> [options]
```

**`<flow-file-path>`**

The local file path to the flow JSON file to run.

---

### Options

**`--workspace [workspace-id]`**

Specifies the workspace by its ID. This option is required for the `postman flows run` command if your flow has a [connector block](/flows/reference/blocks/connector).

---

**`-i, --input [key=value]`**

Set flow inputs as key=value pairs (for example, `--input foo=bar --input baz=qux`).

---

**`-f, --input-file [path.json]`**

Set flow inputs from JSON files (for example, `--input-file ./inputs.json --input-file ./config.json`).

---

**`-s, --scenario [name]`**

Use a pre-built scenario as flow inputs by scenario name. Can be combined with `--input` and `--input-file` to override values.

---

**`--iteration-data-dataset [path-or-id]`**

Runs the flow once per row of a [dataset](/docs/tests-and-scripts/datasets/overview/) view. Accepts a local `.dataset.yaml` path or a cloud dataset ID (cloud dataset IDs require sign-in). Requires `--iteration-data-view`. Dataset columns feed the flow inputs (see `--map-column`).

---

**`--iteration-data-view [name-or-id]`**

Specifies the name or unique identifier of the view (within `--iteration-data-dataset`) whose rows drive the run.

---

**`-m, --map-column [input=column]`**

Binds a flow input to a dataset column (for example, `-m isActive=active`). Pass the option multiple times to bind more than one input. Inputs whose name matches a column bind automatically.

---

**`--no-insecure-file-read`**

Prevents reading dataset files located outside the working directory. Applies to `--iteration-data-dataset`.

---

**`-e, --environment [path]`**

Specify a path to a Postman environment file (JSON or YAML).

---

**`--working-dir [path]`**

Specify the path to the working directory.

---

**`--verbose`**

Show detailed information about the flow run and each request (method, URL, assertions).

---

**`--no-truncate`**

Show full output without truncating long values.

---

**`--output [format]`**

Save the run's results (outputs and logs) to a file in the specified format. Supported formats: `json`. The file is created in the current directory with a unique, timestamped name to avoid overwriting existing files.

---

**`--reporters [format]`**

Save a test results report to a file. Supported formats: `html`. For a dataset run, the report includes the results for each row of the dataset view. The command prints the path of the saved report.

---

**`--report-events`**

Events are reported to the API Catalog and Application Inventory by default, whether you pass `--report-events`. To turn reporting off, pass `--report-events=false`. You can also use `--no-report-events`.

---

**`-x, --suppress-exit-code`**

Specify whether to override the default exit code for the current run.

---

**`--debug`**

Accepted for consistency with the other flows commands. The `postman flows run` command prints no extra output with it.

---

**`--json`**

Accepted for consistency with the other flows commands. It has no effect on the `postman flows run` command. To write the run's results as JSON, use `--output json`.

---

### Examples

```bash
postman flows run postman/flows/[flow-filename].json

postman flows run postman/flows/[flow-filename].json --input [input name]=[value]

postman flows run postman/flows/[flow-filename].json --input-file path/to/[input-filename].json

postman flows run postman/flows/[flow-filename].json --scenario "[scenario name]"

postman flows run postman/flows/[flow-filename].json --scenario "[scenario name]" --input [input name]=[value]

postman flows run postman/flows/[flow-filename].json --output json

postman flows run postman/flows/[flow-filename].json --reporters html

postman flows run postman/flows/[flow-filename].json --workspace [workspace-id]
```

To drive iterations from a [dataset](/docs/tests-and-scripts/datasets/overview/) view, pass the `--iteration-data-dataset` and `--iteration-data-view` options together. Dataset columns feed the flow's inputs. To bind an input to a column with a different name, use the `--map-column` option:

```bash
postman flows run postman/flows/[flow-filename].json \
  --iteration-data-dataset ./postman/datasets/customers.dataset.yaml \
  --iteration-data-view active-customers

postman flows run postman/flows/[flow-filename].json \
  --iteration-data-dataset ./postman/datasets/customers.dataset.yaml \
  --iteration-data-view active-customers \
  --map-column isActive=active
```

Learn more at [Postman Flows overview](/flows/overview/).

## `postman flows update`

You can use the `postman flows update` command to update auth and online/offline settings for a deployed flow. This command requires the flow's ID as an argument.

> **Info**
>
> To use this command, sign in to Postman with [the `postman login` command](/docs/postman-cli/postman-cli-auth/#postman-login).

### Usage

```bash
postman flows update <flow-id> [options]
```

**`<flow-id>`**

The unique identifier of the deployed flow to update.

---

### Options

**`--trigger [on/off]`**

Sets the deployed flow's status to online (`on`) or offline (`off`).

---

**`--auth [on/off]`**

Turns the flow's authentication setting on or off.

---

### Example

```bash
postman flows update 12ab1ab1a1234567890a1234 --trigger on --auth off
```

## `postman flows delete`

You can use the `postman flows delete` command to delete a flow. What the command deletes depends on what you pass:

* **A flow ID** deletes the flow in the Postman Cloud. Any local flow file and its entries in `.postman/resources.yaml` aren't deleted.
* **The path to a local flow file** deletes that file and its entries in `.postman/resources.yaml`. The cloud copy of the flow isn't deleted.

When you delete a flow by its ID, the command warns that any flows that use the deleted flow as a module will fail. It also warns when the flow has active deployments.

If the local flow file you delete is mapped to a cloud flow that still exists, the command prints the `postman flows delete` command for that cloud flow, so you can delete it too. This check is best effort, so the command skips it when you aren't signed in or you're offline.

The command asks you to confirm before it deletes anything, unless you pass `--yes`. In a terminal that isn't interactive, you must pass `--yes`.

> **Info**
>
> To delete a flow by its ID, sign in to Postman with [the `postman login` command](/docs/postman-cli/postman-cli-auth/#postman-login).

### Usage

```bash
postman flows delete <flow-id-or-path> [options]
```

**`<flow-id-or-path>`**

The ID of the flow to delete in the Postman Cloud, or the path to a local flow file to delete.

---

### Options

**`-y, --yes`**

Skips the confirmation prompt.

---

**`--json`**

Prints the result as JSON. The confirmation prompt is written to standard error, so standard output stays parseable.

---

**`--verbose`**

Accepted for consistency with the other flows commands. The `postman flows delete` command prints no extra output with it.

---

**`--debug`**

Prints debug output to standard error. You can combine this option with `--json`.

---

### Examples

```bash
postman flows delete 12ab1ab1a1234567890a1234

postman flows delete 12ab1ab1a1234567890a1234 --yes

postman flows delete postman/flows/[flow-filename].json
```

## `postman flows list-runs`

You can use the `postman flows list-runs` command to fetch run history for a deployed flow in a specified workspace. The result displays the run's timestamp, ID, duration, status, and flow name in a table. This command requires the `--workspace` option.

> **Info**
>
> To use this command, sign in to Postman with [the `postman login` command](/docs/postman-cli/postman-cli-auth/#postman-login).

### Usage

```bash
postman flows list-runs --workspace <workspace-id> [options]
```

### Options

**`-w, --workspace [workspace-id]`**

Specifies the workspace by its ID. This option is required for the `postman flows list-runs` command.

---

**`--flow [flow-id]`**

Filter by flow ID.

---

**`--range [time-range]`** — default: 1h

Specifies the time window in minutes (`1m`), hours (`1h`), or days (`1d`).

---

### Example

```bash
postman flows list-runs --workspace ab12a1bb-1a12-1234-123a-123ab1234a1a --range 1d
```

## `postman flows get-run`

You can use the `postman flows get-run` command to analyze a specific run.

> **Info**
>
> To use this command, sign in to Postman with [the `postman login` command](/docs/postman-cli/postman-cli-auth/#postman-login).

### Usage

```bash
postman flows get-run --run-id <run-id> [options]
```

### Options

**`--run-id [run-id]`**

Specifies the run by its ID. This option is required for the `postman flows get-run` command.

---

**`--logs`**

Shows the full event log including each block's ID, input, and output.

---

**`--filter [block-id]`**

Narrows output by block ID.

---

### Example

```bash
postman flows get-run --run-id main/1a123ab1
```