Share variables in Postman

View as Markdown

You can share global, environment, and collection variables, syncing the values with the Postman cloud. By default, variables have a local value that only you can access in your instance of Postman. Share a variable value to create a separate, shared value your teammates can access. You can also update a shared value and stop sharing a value.

Shared values are used with Postman features that run on the Postman cloud, like scheduled collection runs, monitors, and the Postman CLI.

Once the value is shared, you and your teammates can continue to work with your own local values during development and testing, without affecting the shared value. You can reset your local value back to the shared value, if you’d like.

Create a shared value

As an Editor, you can create shared values to make variable values available to your team in the Postman cloud. Shared values are synced across your workspace and can be used by your teammates in requests, collections, and other Postman features.

If the variable is set as secure, you can create a vault secret in a workspace’s Postman Shared Vault using the same value.

Be aware that the shared values of all variables are published with your documentation. Make sure your shared values don’t contain sensitive information such as passwords or tokens. Share a secure variable if you need to store sensitive information.

Share a variable value

Share a variable value to sync it to the Postman cloud and make it available to your teammates. When you share a value, Postman creates a shared value that others in your workspace can access.

To share a variable, do the following:

  1. Open a global, environment, or collection variable.

  2. Click Cloud View icon Share next to the variable’s value you’d like to share. To share all values, click Options icon More and select Share all.

    If you’ve selected the Options icon More > Shared Value view option, enter a value in the Shared Value column. The shared values automatically update.

Share a secure variable value

Share a secure variable value to create a vault secret in your workspace’s Postman Shared Vault. If the secure variable already references a vault secret in your shared vault, you can share the variable as is.

You can’t share a secure variable that references a vault secret from your local vault. Because only you can access vault secrets stored in your local vault, they can’t be shared with your teammates. Share the value to create a new vault secret in your shared vault with the same value.

To share a secure variable, do the following:

  1. Open a global, environment, or collection variable.
  2. Click Cloud View icon Share next to a secure variable. A secure variable has the secure icon Lock icon next to its name.
  3. Update the vault secret name if you’d like.
  4. Click Create. The vault secret is created in a workspace’s Postman Shared Vault, sharing the variable’s value with your teammates.

Update a shared value

You can update a shared value for a variable with Editor access to the element. The shared value is updated based on your local value, sharing it with your teammates.

To update a shared value, do the following:

  1. Open a global, environment, or collection variable.

  2. Update your local value to differ from the shared value.

  3. Click Edited icon next to a variable’s value, then select Update shared value. To update all shared values, click Options icon More and select Update all shared values.

    If you’ve selected the Options icon More > Shared Value view option, update that value. The shared values automatically update.

To copy a shared value to your clipboard, click Edited icon next to a variable’s value, then select Copy icon.

Stop sharing a shared value

You can also stop sharing a shared value, removing it from the Postman cloud. When you stop sharing a value, you may break API workflows that rely on it. For example, if you stop sharing a variable used in a monitor, the monitor won’t be able to access the variable’s value and may fail.

To stop sharing a variable with your teammates, do the following:

  1. Open a global, environment, or collection variable.

  2. Choose one of the following:

    • If your local value and the shared value are the same, click Synced icon next to the variable’s value, then click Unshare.

    • If your local value and the shared value are different, click Edited icon next to the variable’s value, then select Unshare.

    • If you’ve selected the Options icon More > Shared Value view option, remove the value.

To stop sharing all values, click Options icon More and select Unshare all.

Work with shared values

Once the variable has a shared value, you can continue to update the local value, without affecting the shared value. Local values enable you to develop and test using private credentials or experimental values, without risk of exposing sensitive data to others on your team. You can reset your local value when you’re done, returning it to the shared value that’s synced to the Postman cloud.

For example, your team could have a shared API key and individual API keys. You could do experimental development work locally using your personal key, but use the shared key for team collaboration.

To reset your variable’s value, do the following:

  1. Open a global, environment, or collection variable.
  2. Go to a variable that was updated so the local value differs from the shared value. Updated values have the edited icon Edited icon next to them.
  3. Click Edited icon next to a variable’s value, then select Reset value. To reset all shared values, click Options icon More and select Reset all shared values.

Your local value is updated to match the shared value.