Skip to content

Environments and variables ​

Anywhere text is accepted — URL, headers, body, auth fields — {{name}} is substituted before the request is built.

Environments ​

An environment is a named set of values. Switch between them with the selector at the top right.

The usual shape is one per deployment:

Local        host = localhost:3000
Staging      host = api.staging.example.com
Production   host = api.example.com

with a URL of https://{{host}}/v1/orders that never changes.

Seeing what will be sent ​

Unresolved variables are painted red in the editors, with a wavy underline; resolved ones are green. Hover any of them to see the value that will actually go out.

That matters more than it sounds. A mistyped variable name is otherwise completely invisible until the server rejects the request with something unrelated.

Setting from a script ​

js
sw.environment.set("token", sw.response.json().data.token)

Available immediately to every later request as {{token}}.

Dynamic values ​

Some variables aren't stored — they're generated fresh each time they resolve. They're written the same way, {{$name}}, but the name starts with a $:

{{$guid}}A v4 UUID. $uuid and $randomUUID are the same thing.
{{$timestamp}}Unix seconds. $timestampMs for milliseconds.
{{$isoTimestamp}}ISO 8601, UTC.
{{$randomInt}}A random integer, 0–1000.

Type {{$ in any editor and the autocomplete lists every dynamic variable with a one-line description of what it produces.

The full catalogue ​

Sendwire ships Postman's complete $random* set, so a collection imported from Postman keeps resolving and the names you already know still work. That is over a hundred generators; a representative slice, by area:

AreaExamples
Identifiers & time$guid, $timestamp, $isoTimestamp, $randomDatePast, $randomDateFuture, $randomWeekday, $randomMonth
Text, numbers, colour$randomInt, $randomBoolean, $randomAlphaNumeric, $randomColor, $randomHexColor, $randomAbbreviation
Names & jobs$randomFirstName, $randomLastName, $randomFullName, $randomJobTitle, $randomJobArea
Internet & network$randomEmail, $randomUserName, $randomUrl, $randomDomainName, $randomIP, $randomIPV6, $randomMACAddress, $randomUserAgent, $randomPassword, $randomSemver, $randomPort
Address & location$randomCity, $randomStreetAddress, $randomCountry, $randomCountryCode, $randomLatitude, $randomLongitude
Finance$randomBankAccount, $randomBankAccountIban, $randomCreditCardMask, $randomCurrencyCode, $randomPrice, $randomBitcoin
Commerce & business$randomProductName, $randomDepartment, $randomCompanyName, $randomCatchPhrase, $randomBs
Files & databases$randomFileName, $randomFileExt, $randomMimeType, $randomFilePath, $randomDatabaseColumn, $randomDatabaseType
Lorem ipsum$randomLoremWord, $randomLoremSentence, $randomLoremParagraph, $randomLoremSlug
Images$randomImageUrl, $randomAvatarImage, $randomImageDataUri (plus per-category $randomNatureImage, $randomFoodImage, …)

The autocomplete is the authoritative list — it is generated from the same table the resolver uses, so it never drifts from what actually resolves. A {{$name}} that isn't recognised is left in place verbatim rather than collapsing to an empty string, so a typo is visible in the request instead of silently vanishing.

Reach them from a script with sw.variables.replaceIn("{{$guid}}") — see the script reference.

Secrets ​

Values marked secret are masked in the UI and left out of generated code snippets unless you tick Resolve variables — and the snippet panel warns you when a snippet contains resolved secrets, before you paste it somewhere.

Local-first. No account. No cloud. Telemetry off by default.