Work with environments as a team in Postman

An environment enables you to collaborate on Postman data when you're working as part of a team. You can use environments to share a group of variable values and use those values when sending requests. You can also use environments to share and manage the visibility of sensitive data such as API keys, passwords, or tokens.

To get started, create a new environment, move an environment, or fork an environment in your team workspace. Then assign roles to team members to specify who can view or edit the environment.

Move an environment to a shared workspace

To collaborate with others, move an environment to a shared workspace. You can share data with other team members in private and team workspaces, or share data with anyone using public workspaces.

You must be an Editor on an environment or a Workspace Admin to move the environment to another workspace. Learn more about managing environment roles.

To move an environment to another workspace, do the following:

  1. Select Environments in the sidebar and select an environment.

  2. Select the more actions icon More actions icon and select Move.

  3. Use the search bar to find the workspace you want to move the environment to. You can also select the filter icon Filter icon to filter workspaces by type.

    You can move environments to personal, private, team, and public workspaces that you have access to. You can't move environments from team, private, or public workspaces to a personal workspace.

  4. Select the workspace, then select Move Environment.

    Move environment

Monitors and integrations in the original workspace that use the environment may no longer work and will need to be reconfigured in the new workspace. Collections, APIs, and mock servers that use the environment can be moved manually or reconfigured.

Export an environment

Another way to move an environment is to export it from one workspace and import it into a different workspace.

  1. Select Environments in the sidebar and select an environment.
  2. Select the more actions icon More actions icon and select Export.
  3. Select Save to download the generated JSON file.

You can import the JSON file into another workspace by dragging it into Postman. Learn more about data import and export.

Share an environment

After you move an environment, you can share it with others and add them as collaborators.

  1. Select Environments in the sidebar and select an environment.
  2. Select the share icon Share icon.
  3. Enter the names, group names, or email addresses you want to share the environment with.
  4. If you have the Editor role for the environment, select the role you want your collaborators to have (Viewer or Editor).
  5. Select Share.

Postman will notify the people you shared the element with about your request to collaborate. Learn more about sharing your work in Postman.

To copy a link to the environment you can share with others, select the link icon Link icon next to the environment's name.

Manage environment roles

Your role determines the actions you can take with an environment. You can have the Editor or Viewer role for an environment.

You must be an Editor on an environment or a Workspace Admin to assign environment roles. Learn more about environment roles.

To manage roles for an environment, do the following:

  1. Select Environments in the sidebar and select an environment.

  2. Select the more actions icon More actions icon and select Manage Roles.

  3. Enter the name, group name, or email address you want to assign a role to.

  4. Select the role you want your collaborators to have:

    • Editor - Users can manage and edit the environment.
    • Viewer - Users can view and share the environment.
    • Remove - Users will no longer have access to the environment.
  5. Select Update Roles.

Use an environment with the Viewer role

If you have the Viewer role for an environment, you can access the values of all variables in the environment. You can update a variable's current value, which is used to send requests in your local Postman instance and isn't shared with your team or synced to your Postman account. You can't edit the environment or update a variable's initial value, which is synced to the workspace and shared with your team.

If you have Viewer access to an environment, a lock icon Lock icon displays next to the environment's name to indicate that you can't make changes to the environment. If you need to edit the environment or initial values for variables, request Editor access to the environment.

Use an environment with the Editor role

If you have the Editor role for an environment, you can edit the environment and update a variable's initial value. You can also create and update variables from your scripts.

When you edit the initial value of a shared environment variable, your updated value will be reflected for everyone who has access to the environment. Make sure it's safe to share the value with your team and sync it with Postman's servers. Learn more about managing sensitive variable values.

If you clear the checkbox next to an environment variable, the variable isn't available for use, and references to the variable won't have a value. Users with the Viewer role won't be able to change this setting to make the variable available again.

Request access to an environment

If you need to update the initial value of a variable in an environment you have Viewer access to, you can request Editor access.

  1. Select Environments in the sidebar and select an environment.
  2. Select Edit icon Request to Edit.
  3. Select the team member you want to send the request to, and select the Editor role.
  4. Select Send Request. You'll get an email when your request is approved.

Manage sensitive variable values

Use your Postman Vault to store sensitive data as vault secrets, and reuse them in your local instance of Postman. Only you can access and use values associated with your vault secrets, and secrets aren't synced to the Postman cloud. This enables you to prevent unintentional disclosure of your sensitive data.

If you want to share sensitive data with collaborators, you can store it in an environment as a secret type variable. Learn about the initial and current values when setting environment variables:

  • A variable's initial value is synced to your account using Postman's cloud servers. It's shared with anyone who has access to the environment and is made public when publishing an environment along with a collection. For this reason, don't store sensitive data using the initial value to avoid unintentional disclosure of sensitive data. If the initial value includes sensitive data, you can mask the value by selecting the secret variable type.

  • A variable's current value is used when sending requests in your local instance of Postman and is never synced to your Postman account or shared with your team. This means it's safe to use the current value for sensitive data, such as API keys, passwords, or tokens. Keep in mind that if you persist a variable, the initial value is set to the current value and it's then shared with anyone who can access the environment.

Fork an environment

You can fork an environment to make changes to it without impacting the parent environment. You can also use a fork to contribute to an environment without having Editor access.

To fork an environment, do the following:

  1. Select Environments in the sidebar and select an environment.
  2. Select Fork Fork icon in the workbench.
  3. Enter a Fork label and select the Workspace where you want to create the fork.
  4. Select Fork Environment.

You can edit your forked environment and use it as needed, or you can create a pull request to update the original environment.

View pull requests, forks, and environment details

You can view pull requests, forks, and details about an environment from the right sidebar.

  • To view pull requests, select the pull request icon Pull request icon.

    If you have the Editor role for an environment, you can review pull requests and merge changes into the parent environment.

  • To view forks, select the fork icon Fork icon.

  • To view more information about the environment, including its ID, creator, and any mock servers or monitors that use it, select the information icon Information icon.

Last modified: 2023/11/09