-
Notifications
You must be signed in to change notification settings - Fork 5
Environments and Variables
Environments let you reuse values (API_HOST, TOKEN, …) across requests and
switch between setups (dev / staging / prod) in one click.
Reference a variable anywhere a value is accepted with double braces:
{{name}}
- Valid names use letters, digits,
_,-,.(and a leading$for #Dynamic variables). - Whitespace inside the braces is ignored:
{{ baseUrl }}=={{baseUrl}}. - Names are case-sensitive:
{{BaseUrl}}≠baseurl. -
Unknown variables are left verbatim — a missing
{{token}}stays as{{token}}in the request rather than becoming blank, so breakage is visible.
At send time, variables are substituted into:
- the URL (base + query-param values),
- header values,
- the body (raw text; urlencoded and multipart field names and values),
- auth credentials (token / username / password / API-key name & value).
They are not substituted into: header keys, query-param keys, the HTTP method, or file paths.
History keeps the un-resolved request. A history entry stores
{{token}}, not the resolved value — so you can re-send it under a different environment. See History.
Open the environment selector (top toolbar) → Manage environments… to open the Environments dialog.
- Create: click +; you're prompted for a name (CREATE). It starts empty.
- Edit: select an environment to edit its NAME and VARIABLES (a key/value editor — type in the last row to add another; trash to delete). Changes save immediately.
- Delete: remove an environment (confirmed). If it was the active one, Getman switches to No Environment automatically.
The environment selector shows the current environment (icon + name on wide screens, icon-only on phones). Its menu lists:
- No Environment (a synthetic "none" option),
- your environments (a ✓ marks the active one),
- Manage environments….
Pick one to make it active. With No Environment, only #Dynamic variables resolve; your named variables stay verbatim. The active environment is remembered across restarts.
For a keyboard-fast switch without opening the menu, press Cmd/Ctrl + E to open the SWITCH ENVIRONMENT overlay:
- An arrow-key navigable list of No Environment plus every environment, with the active one marked.
- ↑ / ↓ moves the highlight (it opens on the currently-active row); Enter or a click switches the active environment; Esc closes without changing anything.
This is a third way to change the active environment, alongside the dropdown selector and the Command Palette (Cmd/Ctrl + K).
Beyond environments, any folder in your Collections tree can define its own variables — handy for values that belong to a specific collection or sub-folder (a base URL, an API version) rather than a global environment.
- Edit them: open a folder's menu (right-click / three-dot on desktop, long-press on phone) → VARIABLES. You get the same key/value editor as environments, including per-row secret toggles. Press SAVE to apply.
- Scope & inheritance: a request inherits the merged variables of every folder on its path — a variable set on a parent folder is visible to requests in its sub-folders. When the same name is set at more than one level, the deepest (nearest) folder wins.
- Precedence vs. environments: the active environment wins over collection variables (matching Postman), so collection variables act as built-in defaults an environment can override. Resolution order, highest priority first: active environment → nearest folder → … → outermost folder → #Dynamic variables.
- Secrets: collection variables support the same lock / reveal affordance as environment variables, and are masked the same way on export.
- Sharing: collection variables travel with the collection — they're included in Postman v2.1 export/import and in the git workspace mirror (secret values are masked in both; key names and non-secret values round-trip). See Import Export and Git Workspace.
Only folders hold variables; to give a single request its own value, set it on the folder that contains it.
These built-ins resolve at send time without any environment (a leading $). Each occurrence resolves independently.
| Variable | Resolves to |
|---|---|
{{$guid}} |
A random v4 UUID |
{{$randomUUID}} / {{$randomUuid}}
|
A random v4 UUID (aliases of $guid) |
{{$timestamp}} |
Current Unix time in seconds |
{{$isoTimestamp}} |
Current UTC time, ISO-8601 |
{{$randomInt}} |
A random integer 0–1000
|
If you define an environment variable with the same name (e.g. timestamp), your variable wins over the built-in.
Mark a variable secret to hide its value:
- In the variables editor, click a row's lock icon to toggle secret.
- A secret row's value is masked with a reveal (eye) toggle to peek.
- Secrets are masked on Postman export (empty value,
type: "secret"). - Send-time resolution is unaffected — a secret resolves like any other variable.
- Secret flags follow renames and are pruned when a key is deleted.
In the URL bar (and other variable-aware fields), {{tokens}} are coloured as you type:
- Resolved (defined in the active environment, in a #Collection variables for the open request, or a dynamic variable) → the "resolved" colour.
- Unresolved (unknown name) → the "unresolved/warning" colour.
Colours follow the active theme. This makes it obvious at a glance whether a variable will resolve.
Hover the mouse over a {{variable}} token — in the URL bar or in a params / headers value field — to see, in a small popover, exactly what it will resolve to under the active environment:
- Resolved → the value, with a source line: from <Environment> for an environment value, or from Collection for a #Collection variables.
-
Secret → the value is masked (
•••••• (secret)) with an eye toggle to reveal it, so secrets aren't exposed on a casual hover. -
Dynamic (
{{$timestamp}},{{$guid}}, …) → labelled Generated per request with a freshly-generated sample. - Unresolved → Not defined in <Environment>, or No active environment when none is active.
The popover reads the current active environment, so switching environments updates what you see. (Hovering is a desktop/mouse affordance.)
You can extract values from one response into environment variables to chain requests together — see Tests and Chaining.
Getman on GitHub · Releases · Live demo · Local-first HTTP client — no account, no cloud, no telemetry.
Start here
Core
Variables & automation
More features
- History
- Cookies
- Realtime WebSocket and SSE
- Code Generation
- Command Palette
- Keyboard Shortcuts
- Auto-Update
Configuration
Project