Dynamic Variables

Dynamic Variables

Dynamic variables are built-in shortcuts that generate fresh, random values at the moment you send a request. They work exactly like regular environment variables — you use the {{...}} syntax — but their names always start with $, and you never need to define them anywhere.

{{$guid}}           → a fresh UUID every time
{{$timestamp}}      → the current Unix timestamp
{{$randomEmail}}    → a random email address

Use them anywhere you would use a regular variable: in the URL, query parameters, headers, request body, and authentication fields.


Why Use Dynamic Variables?

Avoid duplicate key errors. If your API rejects requests where a record with that ID already exists, using {{$guid}} in the ID field guarantees each test run creates a unique record.

Test with realistic data. Instead of hardcoding "test@example.com" everywhere, use {{$randomEmail}} to test with a variety of inputs automatically.

Timestamp your requests. Use {{$isoTimestamp}} to record when an event was created, or {{$timestamp}} when an API requires a Unix epoch.

Generate idempotency keys. Many payment and messaging APIs require a unique idempotency key per request — {{$guid}} is perfect for this.


How They Work

When Is the Value Generated?

Dynamic variables are resolved just before the request is sent. Each {{$...}} placeholder is replaced with a freshly generated value at that moment.

Each Occurrence Gets Its Own Value

If you use the same dynamic variable twice in one request, each occurrence gets a separately generated value:

{
  "requestId": "{{$guid}}",
  "correlationId": "{{$guid}}"
}

Both requestId and correlationId will contain different UUIDs. If you need the same value in two places, generate it once in a pre-request script and save it to an environment variable:

// Pre-request script
fc.environment.set("requestId", crypto.randomUUID());

Then use {{requestId}} (without the $) in both places.

Overriding a Dynamic Variable

You can override any dynamic variable by defining an environment variable with the same name (including the $). This is useful when you need reproducible results for a specific test:

KeyValue
$guid00000000-0000-0000-0000-000000000001
$timestamp1700000000

When that environment is active, {{$guid}} returns your fixed value instead of a random UUID.

Resolution Priority

Dynamic built-in variables are resolved last — only if no environment, collection, or local variable with the same name exists. The full order (highest priority first):

  1. Local variables (from pre-request script)
  2. Data file values (Collection Runner iteration data)
  3. Environment variables
  4. Collection variables
  5. Global variables
  6. Dynamic built-in variables ← these

Complete Variable Reference

Identity and UUIDs

VariableExample outputDescription
{{$guid}}3d4f1b2a-9c8e-4a7d-b5f6-1e2c3d4f5a6bA random UUID v4
{{$randomUUID}}7b8c9d0e-1f2a-4b3c-8d4e-5f6a7b8c9d0eThe same as $guid — both work

Current Time

VariableExample outputDescription
{{$timestamp}}1741910400Current time as a Unix timestamp (seconds since 1970)
{{$isoTimestamp}}2026-03-14T10:30:00.000ZCurrent time as an ISO 8601 string in UTC

Random Dates

VariableExample outputDescription
{{$randomDateFuture}}2026-09-21T14:22:11.000ZA random date within the next 365 days
{{$randomDatePast}}2025-08-03T07:45:30.000ZA random date within the past 365 days
{{$randomDateRecent}}2026-03-10T18:12:04.000ZA random date within the past 7 days
{{$randomMonth}}AugustA random month name
{{$randomWeekday}}ThursdayA random day of the week

Numbers and Booleans

VariableExample outputDescription
{{$randomInt}}742A random whole number between 0 and 1000
{{$randomFloat}}483.27A random number between 0 and 1000, with two decimal places
{{$randomBoolean}}trueRandomly either true or false

Characters and Short Strings

VariableExample outputDescription
{{$randomAlphaNumeric}}kA single random letter or digit
{{$randomAlpha}}mA single random lowercase letter
{{$randomHexadecimal}}aA single random hex digit (0–9 or a–f)
{{$randomWord}}eagleA single random English word
{{$randomWords}}cloud tiger riverTwo to five random words
{{$randomSemver}}2.14.7A random semantic version number

Lorem Ipsum Placeholder Text

VariableExample outputDescription
{{$randomLoremWord}}adipiscingA single lorem ipsum word
{{$randomLoremSentence}}Lorem ipsum dolor sit amet.A short lorem ipsum sentence
{{$randomLoremParagraph}}Lorem ipsum…A paragraph of lorem ipsum text (3–5 sentences)

People

VariableExample outputDescription
{{$randomFirstName}}OliviaA random first name
{{$randomLastName}}MartinezA random last name
{{$randomFullName}}Grace ThompsonA random full name
{{$randomNamePrefix}}Dr.A name prefix — Mr., Mrs., Ms., Dr., or Prof.
{{$randomNameSuffix}}Jr.A name suffix — Jr., Sr., II, III, PhD, or MD
{{$randomUserName}}olivia.thompson42A random username (firstname.lastname + 2 digits)
{{$randomEmail}}grace.thompson17@gmail.comA random email address
{{$randomPassword}}X7kLm#nQp2Rv!A random password, 12–20 characters
{{$randomPhoneNumber}}+1-415-732-8901A random US phone number
{{$randomJobTitle}}Senior Backend DeveloperA random job title

Network

VariableExample outputDescription
{{$randomIP}}192.168.42.10A random IPv4 address
{{$randomIPV6}}2001:0db8:85a3:0000:0000:8a2e:0370:7334A random IPv6 address
{{$randomMACAddress}}4a:f3:2c:9b:17:e5A random MAC address
{{$randomProtocol}}httpsEither http or https
{{$randomDomainSuffix}}.ioA random top-level domain — .com, .net, .org, .io, .dev, .co, .app, .ai
{{$randomDomainName}}river.ioA random domain name
{{$randomUrl}}https://storm.dev/oceanA random full URL

Location

VariableExample outputDescription
{{$randomCity}}SingaporeA random city name
{{$randomStreetName}}Maple AvenueA random street name with type
{{$randomStreetAddress}}4721 Oak BoulevardA random full street address
{{$randomCountry}}NetherlandsA random country name
{{$randomCountryCode}}NLA random two-letter country code (ISO 3166-1 alpha-2)
{{$randomLatitude}}52.370216A random latitude (−90 to 90)
{{$randomLongitude}}4.895168A random longitude (−180 to 180)

Colour

VariableExample outputDescription
{{$randomColor}}tealA random colour name
{{$randomHexColor}}#3a9ef2A random hex colour code

Company

VariableExample outputDescription
{{$randomCompanyName}}Nexus TechnologiesA random company name
{{$randomCatchPhrase}}Streamline your workflow with seamless integrationA random marketing catchphrase

Finance

VariableExample outputDescription
{{$randomBankAccount}}48271935An 8-digit bank account number
{{$randomCurrencyCode}}EURA 3-letter currency code (ISO 4217)
{{$randomCurrencySymbol}}A currency symbol
{{$randomCurrencyAmount}}3481.92A random amount between 0 and 10 000
{{$randomCreditCardMask}}xxxx-xxxx-xxxx-4829A masked credit card number

Files and MIME Types

VariableExample outputDescription
{{$randomMimeType}}application/jsonA random MIME type
{{$randomFileExtension}}xlsxA random file extension (no dot)
{{$randomFileName}}tiger_382.pdfA random file name with extension
{{$randomCommonFileName}}report.xlsxA file name with a common office extension
{{$randomCommonFileType}}documentA file type category name
{{$randomCommonFileExtension}}pdfA common file extension

Examples

Creating a New User

POST /users
{
  "id": "{{$guid}}",
  "name": "{{$randomFullName}}",
  "email": "{{$randomEmail}}",
  "phone": "{{$randomPhoneNumber}}",
  "address": "{{$randomStreetAddress}}, {{$randomCity}}, {{$randomCountryCode}}"
}

Every time you send this request, a brand-new user is created with unique details — no more "email already exists" errors when re-running tests.

Timestamped Events

POST /events
{
  "eventId": "{{$guid}}",
  "occurredAt": "{{$isoTimestamp}}",
  "sourceUrl": "{{$randomUrl}}"
}

Adding Idempotency Headers

Some APIs (Stripe, for example) require a unique key per request to safely retry without creating duplicates:

HeaderValue
Idempotency-Key{{$guid}}
X-Request-Time{{$isoTimestamp}}

File Upload Metadata

{
  "fileId": "{{$guid}}",
  "fileName": "{{$randomFileName}}",
  "mimeType": "{{$randomMimeType}}",
  "uploadedAt": "{{$isoTimestamp}}"
}

Stress Testing Validation

Run this in the Collection Runner with 50 iterations to test your API's input validation with 50 different random inputs automatically:

POST /users
{
  "email": "{{$randomEmail}}",
  "password": "{{$randomPassword}}",
  "country": "{{$randomCountryCode}}",
  "jobTitle": "{{$randomJobTitle}}"
}