Environment Variables

Use {{variable}} placeholders anywhere in a request's URL, params, headers, or body — they're resolved against the active environment when the request is sent.

  1. Click Manage Env in the topbar to open the environment editor.
  2. Add a variable, e.g. baseUrl = https://api.example.com and token = your-dev-token.
  3. Pick that environment from the dropdown next to Manage Env.
  4. In a request, set the URL to {{baseUrl}}/users/{{userId}} and add a header Authorization: Bearer {{token}}.

{{userId}} would come from another environment variable, or you can leave params un-interpolated for ones you fill in per-request. Switching environments from the topbar dropdown instantly changes what every {{...}} placeholder resolves to — handy for flipping between dev/staging/prod without editing requests.

Global variables

The Globals entry in Manage Env (above your list of environments) holds variables that aren't tied to any one environment. When a {{variable}} placeholder isn't found in the active environment, Volley falls back to a matching global variable before leaving it un-interpolated. Use globals for values that are the same everywhere (an API key, a shared account id) so you don't have to duplicate them into every environment.

{{variable}} autocomplete

Type {{ in the URL bar, any params/headers/form-data row, the raw body editor, or an auth field, and a dropdown suggests matching variable names from the active environment and globals. Filter by typing, navigate with the arrow keys, and accept with Tab/Enter (or click) to insert {{varName}}.

Saving response values as variables

After sending a request, expand the JSON tree in the response viewer and hover over any leaf value (string, number, boolean, null). A →{{}} button appears — click it to save that value into the active environment under a variable name you choose. The same thing can be done from a test script with pm.environment.set(...) — see Scripts & Tests.