Flows commands
This topic covers flows management commands for the Postman CLI. 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.
To use this command, sign in to Postman with the postman login command.
Usage
Options
Specifies the workspace by its ID. This option is required for the postman flows list command.
Filters flows by name. The pattern can be a regex or a name prefix.
Paginates the list of flows.
Sorts the listed flows. Accepts name or updated.
Example
postman flows trigger
You can use the postman flows trigger command to trigger a deployed flow to run. The deployed flow must have a request trigger. This command requires the flow’s ID as an argument. You can also assign values to the flow’s inputs with the --input option.
To use this command, sign in to Postman with the postman login command.
Usage
The unique identifier of the flow to trigger.
Options
Set key=value pairs in the trigger payload (For example, --input key=value --input baz=qux).
Set payload values from JSON files (For example, --input-file ./inputs.json --input-file ./config.json).
Set query parameters as key=value pairs (For example, --query key=value --query baz=qux).
Set custom headers as key=value pairs (For example, --headers X-API-Key=12345 --headers User-Agent=MyApp).
Show the flow requestURL and payload that would be sent without making the actual request.
Show actual authentication tokens in dry-run output (otherwise secrets are masked).
Show only the response body.
Use a named scenario from the flow definition to construct the input payload, headers, and query parameters (overridden by —headers/—query)
Verbose output
Debug output
JSON output
Example
postman flows deploy
You can use the postman flows deploy command to deploy 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.
To use this command, sign in to Postman with the postman login command.
Usage
The unique identifier of the flow to deploy.
Specifies the path that will be added to the domain where the flow is deployed. This option is required for the postman flows deploy command.
Example
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, making it ideal for CI/CD workflows. Successful runs return status, output, and test results. The postman flows run command has options to set input values, show run log information, and use values from a scenario.
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.
The postman flows run command is available with Postman Enterprise plans.
To use this command, sign in to Postman with the postman login command.
Usage
The local file path to the flow JSON file to run.
Options
Specifies the workspace by its ID. This option is required for the postman flows run command if your flow has a connector block.
Set flow inputs as key=value pairs (for example, --input foo=bar --input baz=qux).
Set flow inputs from JSON files (for example, --input-file ./inputs.json --input-file ./config.json).
Use a pre-built scenario as flow inputs by scenario name. Can be combined with --input and --input-file to override values.
Specify a path to a Postman environment file (JSON or YAML).
Specify the path to the working directory.
Show detailed information about the flow run and each request (method, URL, assertions).
Show full output without truncating long values.
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.
Save a test results report to a file. Supported formats: html.
Specify whether to override the default exit code for the current run.
Debug output.
JSON output.
Examples
Learn more at Postman 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.
To use this command, sign in to Postman with the postman login command.
Usage
The unique identifier of the deployed flow to update.
Options
Sets the deployed flow’s status to online (on) or offline (off).
Turns the flow’s authentication setting on or off.
Example
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.
To use this command, sign in to Postman with the postman login command.
Usage
Options
Specifies the workspace by its ID. This option is required for the postman flows list-runs command.
Filter by flow ID.
Specifies the time window in minutes (1m), hours (1h), or days (1d).
Example
postman flows get-run
You can use the postman flows get-run command to analyze a specific run.
To use this command, sign in to Postman with the postman login command.
Usage
Options
Specifies the run by its ID. This option is required for the postman flows get-run command.
Shows the full event log including each block’s ID, input, and output.
Narrows output by block ID.