Skip to main content

Environments

An environment is a named set of variables used in requests. Keep separate environments for development, staging and production, then select the environment for the server and credentials you want to use.

Creating Environments​

  1. Open the environment dropdown and choose New environment.
  2. Give the environment a name.
  3. Add variables as key-value pairs.
  4. Click Save.

Environment Variables​

Reference a variable by its name inside double curly braces. For example, set baseUrl to https://api.dev.example.com and userId to 123, then use this request URL:

{{baseUrl}}/users/{{userId}}

Learn more about variable syntax →

Value Modes​

Use the Value mode control beside a variable's value to choose how it is stored and resolved:

ModeBehaviorAvailability
Plain text (Text)Stores the value as entered.Free
EncryptedStores the value encrypted with AES-256. Unlock it with your secrets password. Referenced values are decrypted when sending a request; you can also explicitly reveal a value in the editor.Free
Azure Key Vault (KeyVault)Stores a reference such as {{kv:secret-name}}. The secret is fetched at send time only when the request uses it.Pro (Professional)

For Key Vault, set the Azure Key Vault URL in the environment editor's Integrations section. For example, a variable named apiToken can hold {{kv:api-token}}; reference it in a request as {{apiToken}}.

Parent Environments​

Select a Parent Environment in the environment editor to inherit its variables. A child environment can override a parent's variable with its own value for the same name.

For example, a parent named Common can define shared variables, while Development and Production override baseUrl for their respective servers.

Learn more about parent environments →

Switching Environments​

Choose an environment from the environment dropdown. The selected environment supplies the variables for requests that use it. Use the pencil button beside an environment in the dropdown to edit it.

Managing Sensitive Data​

Choose Encrypted for passwords, API keys and tokens that you want to store locally. Use the title-bar lock icon and Unlock… to enter the secrets password for the workspace or Team Sync repository. Choose Lock now to lock it again. Sending a request that needs a locked Encrypted value prompts you to unlock it.

Encrypted values are safe to commit to a Team Sync repo: the files contain encrypted values, and teammates need the secrets password to unlock them. Share that password separately from the repository. Plain text values are stored as entered, so choose Encrypted before saving a sensitive value.

With Azure Key Vault (Pro), keep the secret in your vault and store its {{kv:secret-name}} reference in the environment. Only references used by a request are fetched when sending it.

Encrypted values are always masked in exported documentation.

Importing and Sharing​

Import Postman Environment JSON files using the Postman importer. Environments are already JSON files in the workspace's data folder or Team Sync folder; copy them for backup or share them through Team Sync. Encrypted values remain encrypted in those files.

Next Steps​