Skip to content
Voyager

Environments and variables

Define a set of variables per environment — staging, production, a teammate's local server — and reference them as {{variableName}} instead of hardcoding a value into every request.

What it does

An environment editor lets you create, rename, and delete environments and their variables. The active environment is chosen from a selector in the workspace shell, and its variables resolve inside a request's URL, headers, and body at send time — switching the environment switches every value a request resolves against without editing the request itself.

Use cases

Frequently asked questions

What can I use a variable for?

Anything you’d otherwise hardcode and edit by hand — a base URL, an API key, a tenant id — referenced as {{variableName}} in the URL, headers, or body.

Do variables from a collection or global scope also resolve?

Environment-scoped variables resolve today. Collection- and global-scope variable resolution is still being wired up, so keep environment-scoped variables as the reliable option for now.

How do I switch environments?

An environment selector sits in the workspace shell — switching it changes every {{variable}} a request resolves against on its next send.

Related: Request builder · Collections