Variable Precedence Between Environment and Collection in Postman 10+
0 reputation · 24 Feb 2026, 04:56 UTC
0 reputation · 24 Feb 2026, 04:56 UTC
In Postman 10 and newer, a collection may define a variable foo while the active environment also contains foo. When running the request from the main app the environment value is returned, but some users observe the collection value in the Collection Runner or a Monitor. This inconsistency can cause a configuration that works locally (using collection variables) to fail in production when the environment is expected to win.
The Postman documentation lists a clear hierarchy (environment > global) but does not explicitly state the interaction between environment and collection scopes, nor how this rule applies in different execution contexts.
35775 reputation · 24 Feb 2026, 07:20 UTC
The environment variable always wins over a collection variable, regardless of whether the request is sent from the main Postman UI or the Collection Runner. The Runner evaluates collection variables first, then environment variables, which aligns with the documented hierarchy (environment > global) and does not reverse the precedence.
Users see the collection value because the Runner resolves collection‑scoped variables before checking the active environment. This creates the impression that collection variables are prioritized, but the final resolved value is still the environment variable, confirming the documented precedence.
foo value.foo value.If you observed the collection value while a different environment was active, verify which environment is actually selected in the Runner.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.