← Back to Overview

ENVIRONMENTS

Variables & Interpolation

Use {{variable}} placeholders anywhere in your requests. Variables are resolved at send-time from environments, vault secrets, and collection variables.

{{variable}} Syntax

Variables use double curly brace delimiters and are resolved just before the request is sent over the wire.

Double curly braces: {{variable_name}}
Case-sensitive: {{Token}}{{token}}
Supported characters: letters, numbers, underscores, hyphens
Resolved at send-time — not while typing in the editor
Unresolved variables are sent as literal text: {{unknown_var}}

Example:

GET {{base_url}}/users/{{user_id}}
Authorization: Bearer {{token}}

Where Variables Work

Variables can be used in virtually every input field across the request builder:

LocationExample
URL bar{{base_url}}/users/{{id}}
Query parameter valuespage={{page_num}}
Header valuesAuthorization: Bearer {{token}}
Body content (JSON, raw, XML, GraphQL){"key": "{{value}}"}
Auth fieldsusername, password, token, API key value
Form-data text field valuesfield={{dynamic_value}}
GraphQL variables JSON{"userId": "{{id}}"}
Mock server response bodies & headersResolved when mock responds
Pre-request & test scriptsRead/write via environment object

Visual Indicators

The editor highlights variables with color-coded tokens so you can immediately see their resolution status and source:

Resolved variables: green colored token in the editor
Unresolved variables: orange/amber colored token
Hover tooltip: shows resolved value + source (which environment/vault/collection)
Unresolved hover: shows "Add Variable" button to create it in the active environment

Color coding by source:

Local Env Global Env Vault Secret Collection Var
Resolved variable showing value and source on hover

Resolved variable showing value and source on hover

Unresolved variable with Add Variable action

Unresolved variable with Add Variable action

Variable Sources

Variables are resolved from multiple sources with a defined priority chain. If the same variable name exists in multiple sources, the higher-priority source wins.

PrioritySourceDefined in
1 (lowest)Collection variablesCollection editor → Overview tab
2Global environmentSelected global env variables
3Vault secretsActive secret set entries (variableName field)
4 (highest)Local environmentSelected local env variables
Resolution priority: collection < global env < vault < local env — local environment always wins. Useful for testing overrides.

Dynamic Variables (Scripts)

Scripts can programmatically set and read variables during request execution:

Pre-request script — set a variable:

environment.set('timestamp', Date.now().toString());
environment.set('nonce', Math.random().toString(36).slice(2));

Test script — extract from response:

const body = response.json();
environment.set('token', body.access_token);
environment.set('user_id', body.user.id.toString());
Dynamic variables persist in the active environment for the session
setVariables GUI rules also extract values after response (no code required)

Response Variable Extraction

Extract values from responses and save them as variables — no scripting required. Use the GUI Set Variables rules on the Tests tab:

Extract from: JSONPath, header value, body text, or regex pattern
Saved to: the active environment — available immediately for subsequent requests
Collection runs: extracted values available to subsequent requests in sequential mode
See the Set Variables page for full details on configuring extraction rules, supported sources, and JSONPath syntax.

Next

Ko-fi