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:
| Key | Value |
|---|---|
$guid | 00000000-0000-0000-0000-000000000001 |
$timestamp | 1700000000 |
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):
- Local variables (from pre-request script)
- Data file values (Collection Runner iteration data)
- Environment variables
- Collection variables
- Global variables
- Dynamic built-in variables ← these
Complete Variable Reference
Identity and UUIDs
| Variable | Example output | Description |
|---|---|---|
{{$guid}} | 3d4f1b2a-9c8e-4a7d-b5f6-1e2c3d4f5a6b | A random UUID v4 |
{{$randomUUID}} | 7b8c9d0e-1f2a-4b3c-8d4e-5f6a7b8c9d0e | The same as $guid — both work |
Current Time
| Variable | Example output | Description |
|---|---|---|
{{$timestamp}} | 1741910400 | Current time as a Unix timestamp (seconds since 1970) |
{{$isoTimestamp}} | 2026-03-14T10:30:00.000Z | Current time as an ISO 8601 string in UTC |
Random Dates
| Variable | Example output | Description |
|---|---|---|
{{$randomDateFuture}} | 2026-09-21T14:22:11.000Z | A random date within the next 365 days |
{{$randomDatePast}} | 2025-08-03T07:45:30.000Z | A random date within the past 365 days |
{{$randomDateRecent}} | 2026-03-10T18:12:04.000Z | A random date within the past 7 days |
{{$randomMonth}} | August | A random month name |
{{$randomWeekday}} | Thursday | A random day of the week |
Numbers and Booleans
| Variable | Example output | Description |
|---|---|---|
{{$randomInt}} | 742 | A random whole number between 0 and 1000 |
{{$randomFloat}} | 483.27 | A random number between 0 and 1000, with two decimal places |
{{$randomBoolean}} | true | Randomly either true or false |
Characters and Short Strings
| Variable | Example output | Description |
|---|---|---|
{{$randomAlphaNumeric}} | k | A single random letter or digit |
{{$randomAlpha}} | m | A single random lowercase letter |
{{$randomHexadecimal}} | a | A single random hex digit (0–9 or a–f) |
{{$randomWord}} | eagle | A single random English word |
{{$randomWords}} | cloud tiger river | Two to five random words |
{{$randomSemver}} | 2.14.7 | A random semantic version number |
Lorem Ipsum Placeholder Text
| Variable | Example output | Description |
|---|---|---|
{{$randomLoremWord}} | adipiscing | A 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
| Variable | Example output | Description |
|---|---|---|
{{$randomFirstName}} | Olivia | A random first name |
{{$randomLastName}} | Martinez | A random last name |
{{$randomFullName}} | Grace Thompson | A 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.thompson42 | A random username (firstname.lastname + 2 digits) |
{{$randomEmail}} | grace.thompson17@gmail.com | A random email address |
{{$randomPassword}} | X7kLm#nQp2Rv! | A random password, 12–20 characters |
{{$randomPhoneNumber}} | +1-415-732-8901 | A random US phone number |
{{$randomJobTitle}} | Senior Backend Developer | A random job title |
Network
| Variable | Example output | Description |
|---|---|---|
{{$randomIP}} | 192.168.42.10 | A random IPv4 address |
{{$randomIPV6}} | 2001:0db8:85a3:0000:0000:8a2e:0370:7334 | A random IPv6 address |
{{$randomMACAddress}} | 4a:f3:2c:9b:17:e5 | A random MAC address |
{{$randomProtocol}} | https | Either http or https |
{{$randomDomainSuffix}} | .io | A random top-level domain — .com, .net, .org, .io, .dev, .co, .app, .ai |
{{$randomDomainName}} | river.io | A random domain name |
{{$randomUrl}} | https://storm.dev/ocean | A random full URL |
Location
| Variable | Example output | Description |
|---|---|---|
{{$randomCity}} | Singapore | A random city name |
{{$randomStreetName}} | Maple Avenue | A random street name with type |
{{$randomStreetAddress}} | 4721 Oak Boulevard | A random full street address |
{{$randomCountry}} | Netherlands | A random country name |
{{$randomCountryCode}} | NL | A random two-letter country code (ISO 3166-1 alpha-2) |
{{$randomLatitude}} | 52.370216 | A random latitude (−90 to 90) |
{{$randomLongitude}} | 4.895168 | A random longitude (−180 to 180) |
Colour
| Variable | Example output | Description |
|---|---|---|
{{$randomColor}} | teal | A random colour name |
{{$randomHexColor}} | #3a9ef2 | A random hex colour code |
Company
| Variable | Example output | Description |
|---|---|---|
{{$randomCompanyName}} | Nexus Technologies | A random company name |
{{$randomCatchPhrase}} | Streamline your workflow with seamless integration | A random marketing catchphrase |
Finance
| Variable | Example output | Description |
|---|---|---|
{{$randomBankAccount}} | 48271935 | An 8-digit bank account number |
{{$randomCurrencyCode}} | EUR | A 3-letter currency code (ISO 4217) |
{{$randomCurrencySymbol}} | € | A currency symbol |
{{$randomCurrencyAmount}} | 3481.92 | A random amount between 0 and 10 000 |
{{$randomCreditCardMask}} | xxxx-xxxx-xxxx-4829 | A masked credit card number |
Files and MIME Types
| Variable | Example output | Description |
|---|---|---|
{{$randomMimeType}} | application/json | A random MIME type |
{{$randomFileExtension}} | xlsx | A random file extension (no dot) |
{{$randomFileName}} | tiger_382.pdf | A random file name with extension |
{{$randomCommonFileName}} | report.xlsx | A file name with a common office extension |
{{$randomCommonFileType}} | document | A file type category name |
{{$randomCommonFileExtension}} | pdf | A 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:
| Header | Value |
|---|---|
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}}"
}