What Are Dynamic Variables?
Dynamic variables are Postman's built-in tokens, always prefixed with a dollar sign like {{$guid}}, {{$timestamp}}, or {{$randomInt}}, that resolve to a fresh value every single time the request is sent — no scripting required. Under the hood they're powered by the faker.js library bundled into Postman, which is why they can produce realistic-looking names, emails, addresses, and dates rather than just raw random numbers.
Cricket analogy: A ball-tracking system generates a fresh trajectory prediction for every single delivery bowled, never reusing yesterday's data for today's Hawk-Eye reading.
Common Dynamic Variables
Some of the most frequently used tokens are {{$randomEmail}}, {{$randomFullName}}, {{$randomInt}}, {{$isoTimestamp}}, and {{$guid}}, and they can be dropped directly into a URL, header, or JSON body. Their main practical value is generating unique test data on demand — for example, using {{$randomEmail}} in a signup request body avoids 'email already registered' failures when the same request runs across dozens of Collection Runner iterations.
Cricket analogy: An IPL auction assigns a unique player ID to every trialist so no two players' stats get mixed up in the database, even if two share the same name.
{
"fullName": "{{$randomFullName}}",
"email": "{{$randomEmail}}",
"username": "{{$randomUserName}}",
"age": {{$randomInt}},
"signupId": "{{$guid}}",
"registeredAt": "{{$isoTimestamp}}"
}Typing {{$ in any URL, header, or body field opens Postman's autocomplete with the full catalog of dynamic variables, grouped by category — Person, Internet, Date/Time, Commerce, and more — all backed by the bundled faker.js library.
Generating Custom Fake Data with pm.variables and Faker in Scripts
When a single {{$...}} token isn't enough — say you need an array of fake line items, or you need the same generated value to appear consistently in two different fields — you drop into a pre-request script, build the data with JavaScript logic, and store it with pm.variables.set() so multiple fields in the request can reference the exact same generated value.
Cricket analogy: A groundskeeper custom-prepares a pitch with specific grass length and moisture for a day-night Test, going beyond the standard pitch report template.
Every {{$randomInt}}, {{$guid}}, or similar token is re-resolved independently each time it appears, including across multiple occurrences in the same request and across every Collection Runner iteration. Don't assume two separate {{$randomInt}} tokens in one request body will produce the same number — capture the value once with pm.variables.set() in a pre-request script if you need to reuse it.
- Dynamic variables are built-in tokens prefixed with $ (e.g. {{$guid}}, {{$randomEmail}}) that resolve to a fresh value on every send, no scripting required.
- They're powered by the faker.js library bundled into Postman, covering categories like Person, Internet, Date/Time, and Commerce.
- Typing {{$ in any field triggers autocomplete listing every available dynamic variable.
- Common examples: {{$guid}}, {{$timestamp}}, {{$isoTimestamp}}, {{$randomInt}}, {{$randomEmail}}, {{$randomFullName}}.
- They're ideal for avoiding data collisions in test data, like unique emails or IDs, across repeated Collection Runner iterations.
- For more control than a single token, generate custom fake data in a pre-request script and store it with pm.variables.set() so the same generated value can be reused across multiple fields.
Practice what you learned
1. What does {{$guid}} produce when used in a Postman request field?
2. What library powers Postman's built-in dynamic variables like {{$randomEmail}}?
3. How do you discover the full list of available dynamic variables while editing a request?
4. Why might you use {{$randomEmail}} in a signup request body during a Collection Runner loop with 50 iterations?
5. If you need the exact same random value to appear in two different fields of the same request, what should you do?
Was this page helpful?
You May Also Like
Pre-request Scripts
How to run JavaScript before a Postman request is sent, to set variables, compute signatures, and build dynamic request data.
The pm API: Request, Response, and Environment
A tour of Postman's core pm object — pm.request, pm.response, and pm.environment — the JavaScript API used in both pre-request and test scripts.
Chaining Requests with Extracted Data
How to pass data from one Postman request's response into the next request by extracting values in a test script and storing them as variables.
Test Scripts Basics with pm.test()
How to write assertions in Postman's Tests tab using pm.test() and pm.expect() to automatically validate API responses.