Skip to content

Dynamic variables ​

A dynamic variable makes a new value every time you send. Use one when a request needs something fresh: a unique ID, the current time, a made-up name or email for test data. You do not define them. They are built in, and their names start with $.

Use a dynamic variable ​

Write the name between double curly braces, with the $, anywhere a normal variable works: the URL, params, headers, the body, auth fields.

json
{
  "id": "{{$guid}}",
  "email": "{{$randomEmail}}",
  "name": "{{$randomFullName}}",
  "createdAt": "{{$isoTimestamp}}"
}

What goes out looks like this, and differs on every send:

json
{
  "id": "0b8a3c1e-5a0f-4c53-9a44-6f1f2a9d7c10",
  "email": "nina.patel@harbor.dev",
  "name": "Omar Silva",
  "createdAt": "2026-11-09T08:15:30.123456Z"
}

Things to know:

  • Every occurrence gets its own value. Two {{$guid}} in one request produce two different IDs. To use the same generated value twice, store it in a normal variable first with a pre-request script.
  • Names are case-sensitive. {{$randomInt}} works; {{$randomint}} is left as written.
  • Unknown names are left as written. A {{$something}} that is not in the tables below is sent unchanged.
  • Your own variables win. If you define a variable whose name is exactly $guid, its value is used instead.
  • The data is made up. Names, cities and companies come from short built-in lists. Use them for test data, not for realistic samples.
  • To see what was sent, open the Console.

The names match Postman's, so imported collections keep working. The generated values are ApiWorkbench's own and will not look identical to Postman's.

Common ​

NameGeneratesExample
{{$guid}}A random UUID (version 4)0b8a3c1e-5a0f-4c53-9a44-6f1f2a9d7c10
{{$randomUUID}}The same as {{$guid}}e2c7f5a4-8d3b-4f19-b6a2-91c0d4e8f7a3
{{$timestamp}}The current time in seconds since 19701794212130
{{$isoTimestamp}}The current time in ISO 8601, UTC2026-11-09T08:15:30.123456Z
{{$randomInt}}A whole number from 0 to 1000417
{{$randomAlphaNumeric}}One lower-case letter or digitk
{{$randomBoolean}}true or falsetrue

Text and numbers ​

NameGeneratesExample
{{$randomWord}}One wordharbor
{{$randomWords}}Two to five wordsdelta river pixel
{{$randomLoremWord}}One wordmeadow
{{$randomLoremWords}}Three wordsorbit ember cloud
{{$randomLoremSentence}}A sentence of five to ten wordsSignal forest alpha quartz river.
{{$randomLoremParagraph}}Three sentences
{{$randomLoremSlug}}Three words joined by hyphenskernel-island-vector
{{$randomHexColor}}A colour as # and six hex digits#3fa9c2
{{$randomColor}}A colour nameteal
{{$randomAbbreviation}}A technical abbreviationJSON
{{$randomSemver}}A version number3.14.27

Internet ​

NameGeneratesExample
{{$randomIP}}An IPv4 address203.17.88.141
{{$randomIPV6}}An IPv6 address3f2a:09bc:… (eight groups)
{{$randomMACAddress}}A MAC address4a:0f:c3:91:7e:2d
{{$randomPassword}}15 lower-case letters and digitsx7k2m9q4a1z8b3c
{{$randomUserName}}A first name and a numberpriya204
{{$randomDomainName}}A domain namelantern.io
{{$randomDomainWord}}The word part of a domainnebula
{{$randomDomainSuffix}}com, net, org, io or devorg
{{$randomUrl}}An https:// addresshttps://granite.net
{{$randomEmail}}An email address at a made-up domainben.chen@cloud.com
{{$randomExampleEmail}}An email address at example.comsofia42@example.com
{{$randomProtocol}}http or httpshttps
{{$randomUserAgent}}A Chrome-style user agent string
{{$randomLocale}}A language codefr

TIP

{{$randomEmail}} can produce an address at a domain that really exists. For data that may trigger a real email, use {{$randomExampleEmail}}: example.com is reserved for examples and never delivers mail.

Names and people ​

NameGeneratesExample
{{$randomFirstName}}A first nameElena
{{$randomLastName}}A last nameNakamura
{{$randomFullName}}A first and last nameKai Fernandez
{{$randomNamePrefix}}Mr., Ms., Mrs. or Dr.Dr.
{{$randomNameSuffix}}Jr., Sr., II, III or PhDJr.
{{$randomJobTitle}}A level and a jobSenior Analyst
{{$randomJobType}}A jobDesigner
{{$randomPhoneNumber}}A phone number as three groups of digits415-732-9081

Location ​

NameGeneratesExample
{{$randomCity}}A cityLisbon
{{$randomCountry}}A countryKenya
{{$randomCountryCode}}A two-letter country codeJP
{{$randomStreetName}}A street namemeadow Street
{{$randomStreetAddress}}A number and a street name221 timber Street
{{$randomLatitude}}A latitude from -90 to 90, four decimals12.9716
{{$randomLongitude}}A longitude from -180 to 180, four decimals-73.5674

Business and finance ​

NameGeneratesExample
{{$randomCompanyName}}A company nameGlobex Ltd
{{$randomPrice}}An amount from 0 to 1000, two decimals249.90
{{$randomCurrencyCode}}A currency codeEUR
{{$randomBankAccount}}An eight-digit number48201937

Dates ​

NameGeneratesExample
{{$randomDateFuture}}A time within the next year, ISO 8601, UTC2027-03-14T19:22:05.482913Z
{{$randomDatePast}}A time within the past year, ISO 8601, UTC2026-02-01T06:40:51.107264Z
{{$randomDateRecent}}A time within the last two days, ISO 8601, UTC2026-11-08T11:03:27.951380Z
{{$randomWeekday}}A weekday nameThursday
{{$randomMonth}}A month nameAugust

Recipes ​

A unique ID per request ​

Add a header so you can find the request in server logs.

HeaderValue
X-Request-Id{{$guid}}

A new user on every send ​

json
{
  "username": "{{$randomUserName}}",
  "email": "{{$randomExampleEmail}}",
  "password": "{{$randomPassword}}",
  "city": "{{$randomCity}}"
}

Sending this repeatedly from the runner or the load tester creates a different user each time.

A fresh timestamp in a signed token ​

In JWT Bearer auth, put {{$timestamp}} in the payload so the iat claim is always now:

json
{ "sub": "1234567890", "iat": {{$timestamp}} }

Avoid a cached answer ​

Add a query parameter that changes every time.

ParameterValue
nocache{{$timestamp}}

Next steps ​