Postman Environment & Variables

In Postman, an environment is a set of key-value pairs that allows you to manage and store different variables for your API requests. This is useful for switching between different setups, like sandbox and production, without having to manually change values in each request. Creating these will also make authentication easier and allow you to easily switch between environments without having to re-authenticate.

Step 1: Create New Environment

Click on the “Environments” tab on the left-hand side and click “New”. Then select “Environment” from the next popup.

Step 2: Initialize Environment Variables

Once you’ve created the environment, please apply a name to it. Since you will have access to both the testing and production environments we suggest naming your environments “MyCarrier - Testing” and “MyCarrier - Prod”.

As shown above, you should also create variables for the following items:

  1. API URLs
  2. Username (the account admin email)
  3. Password (the API key)

Find API environment URL values here.

Step 3: Use Your Environment

Now that you’ve established variables at the environment level, you can re-use them throughout the Postman application. Simply use double brackets to reference a variable you’ve established.

Here is an example of how the URL variables can be re-used in the request path for an endpoint


What’s Next