Create and manage environments from the Postman VS Code extension

You can add a set of variables to an environment that you can use in your requests.

To learn more about managing environments in Postman, see Group sets of variables in Postman using environments.

Add variables to an environment

To create an environment and add variables to it, do the following:

  1. Select a workspace from the workspace dropdown menu in the sidebar.
  2. Click Environment icon Environments.
  3. Click Add icon.
  4. Add variables to the environment.
  5. Click Save.

You can also use the Postman: Create a new Postman Environment command from the Command Palette to create an environment.

Use environment variables

To use environment variables in a request, do the following:

  1. Click Collection icon Collections.
  2. Select a request.
  3. Select an environment from the environment selector in the top-right corner.

Last modified: 2025/07/25