diff --git a/docs.json b/docs.json
index 4914d8e..782c6a5 100644
--- a/docs.json
+++ b/docs.json
@@ -104,6 +104,7 @@
"general/api-client/environments-and-variables/collection-and-subcollection-variables",
"general/api-client/environments-and-variables/global-variables",
"general/api-client/environments-and-variables/runtime-variables",
+ "general/api-client/environments-and-variables/dynamic-variables",
"general/api-client/environments-and-variables/variable-precedence",
"general/api-client/environments-and-variables/using-variables-in-api-requests"
]
diff --git a/general/api-client/environments-and-variables/dynamic-variables.mdx b/general/api-client/environments-and-variables/dynamic-variables.mdx
new file mode 100644
index 0000000..0a83dda
--- /dev/null
+++ b/general/api-client/environments-and-variables/dynamic-variables.mdx
@@ -0,0 +1,1297 @@
+---
+title: "Dynamic Variables"
+slug: "dynamic-variables"
+path: "/api-client/environments-and-variables/dynamic-variables"
+visibility: "PUBLIC"
+format: "MDX"
+---
+
+Dynamic variables are built in values that are generated automatically at request execution time. They remove the need for manual inputs or custom scripts when you need commonly used data like timestamps, random values, or unique identifiers.
+
+Unlike environment, collection, or global variables which you define yourself, dynamic variables are available out of the box and always generate a fresh value when a request runs.
+
+
+ Requestly uses [**Faker.js**](https://fakerjs.dev/) to generate realistic data for dynamic variables.
+
+
+They are accessed using the special `$` prefix syntax:
+```
+{{$variableName}}
+```
+
+## Using dynamic variables
+
+### In Templates
+
+You can use dynamic variables anywhere in a request including the URL, headers, query params, and body.
+
+
+
+ Use dynamic variables like `{{$randomFirstName}}`, `{{$randomLastName}}`, and `{{$randomEmail}}` to create unique user data for each request:
+
+
+
+
+ Dynamic variables are great for generating unique query parameters or path segments:
+
+
+
+
+
+ You can also use dynamic variables in headers to generate unique values for each request:
+
+
+
+
+### In Scripts
+
+You can also access dynamic variables in scripts using the `rq.$variableName()` method syntax:
+
+
+
+
+ **Script syntax:** When using dynamic variables in scripts, call them as functions: `rq.$variableName()` instead of the template syntax `{{$variableName}}`.
+
+
+## Variable precedence
+
+When the same variable name is defined as both a dynamic variable and a user-defined variable (environment, collection, or global), the **user-defined variable takes precedence**.
+
+### Precedence order
+
+**User-defined variables** (Runtime → Environment → SubCollection → Collection → Global) **>** **Dynamic variables**
+
+**Example :** If you define an environment variable named `$randomUUID`:
+
+```javascript
+rq.environment.set("$randomUUID", "123e4567-e89b-12d3-a456-426614174000");
+```
+
+And then use `{{$randomUUID}}` in your request, it will resolve to `"123e4567-e89b-12d3-a456-426614174000"` (your custom value), **not** the dynamic UUID value.
+
+
+ **Best practice:** Never use the `$` prefix (e.g., `{{$randomUUID}}`) for user-defined variables.
+
+
+## Variable arguments
+
+Some dynamic variables support optional arguments to customize their output.
+
+### Syntax
+
+
+
+ ```
+ {{$variableName arg1 arg2 ...}}
+ ```
+
+ **Example:**
+ ```json
+ {
+ "id": "{{$randomAlphaNumeric 10}}",
+ "email": "{{$randomEmail \"John\" \"Doe\"}}",
+ "age": "{{$randomInt 18 65}}",
+ "price": "{{$randomPrice 10 100 2 \"$\"}}"
+ }
+ ```
+
+
+
+ ```javascript
+ rq.$variableName(arg1, arg2, ...);
+ ```
+
+ **Example:**
+ ```javascript
+ const userId = rq.$randomAlphaNumeric(10);
+ const email = rq.$randomEmail("John", "Doe");
+ const age = rq.$randomInt(18, 65);
+ const price = rq.$randomPrice(10, 100, 2, "$");
+ ```
+
+
+
+
+ For a complete list of variables that support arguments and their available options, see the [Variables with arguments](#variables-with-arguments) section below.
+
+
+## Supported dynamic variables
+
+Requestly provides a comprehensive set of built-in dynamic variables organized by category. Variables marked with ✓ support custom arguments.
+
+### Common
+
+| Variable | Description | Example |
+|----------|-------------|----------------|
+| `{{$guid}}` | uuid-v4 style guid | `f47ac10b-58cc-4372-a567-0e02b2c3d479` |
+| `{{$timestamp}}` | Current UNIX timestamp in seconds | `1739404800` |
+| `{{$isoTimestamp}}` | Current ISO timestamp at zero UTC | `2026-02-13T14:25:30.177Z` |
+| `{{$randomUUID}}` | A random 36-character UUID | `a3bb189e-8bf9-3888-9912-ace4e6543002` |
+
+### Text, Numbers and Colors
+
+| Variable | Description | Example |
+|----------|-------------|----------------|
+| `{{$randomAlphaNumeric}}` | A random alpha-numeric character | `t` |
+| `{{$randomBoolean}}` | A random boolean value | `FALSE` |
+| `{{$randomInt}}` | A random integer between 0 and 10000 | `472` |
+| `{{$randomColor}}` | A random human readable color | `blue` |
+| `{{$randomHexColor}}` | A random hex value | `#2f8a45` |
+| `{{$randomAbbreviation}}` | A random abbreviation | `HTTP` |
+
+### Internet and IP Addresses
+
+| Variable | Description | Example |
+|----------|-------------|----------------|
+| `{{$randomIP}}` | A random IPv4 address | `192.168.45.233` |
+| `{{$randomIPV6}}` | A random IPv6 address | `2001:0db8:85a3:0000:0000:8a2e:0370:7334` |
+| `{{$randomMACAddress}}` | A random MAC address | `aa:bb:cc:dd:ee:ff` |
+| `{{$randomPassword}}` | A random 15-character alpha-numeric password | `8kP2mX9qL4nB5wV3` |
+| `{{$randomLocale}}` | A random two-letter language code (ISO 639-1) | `fr` |
+| `{{$randomUserAgent}}` | A random user agent | `Mozilla/5.0 ...` |
+| `{{$randomProtocol}}` | A random internet protocol | `https` |
+
+### Names
+
+| Variable | Description | Example |
+|----------|-------------|----------------|
+| `{{$randomFirstName}}` | A random first name | `Sarah` |
+| `{{$randomLastName}}` | A random last name | `Johnson` |
+| `{{$randomFullName}}` | A random first and last name | `Michael Anderson` |
+| `{{$randomNamePrefix}}` | A random name prefix | `Ms.` |
+| `{{$randomNameSuffix}}` | A random name suffix | `Jr.` |
+
+### Profession
+
+| Variable | Description | Example |
+|----------|-------------|----------------|
+| `{{$randomJobArea}}` | A random job area | `Security` |
+| `{{$randomJobDescriptor}}` | A random job descriptor | `Chief` |
+| `{{$randomJobTitle}}` | A random job title | `Senior Data Analyst` |
+| `{{$randomJobType}}` | A random job type | `Engineer` |
+
+### Phone, Address and Location
+
+| Variable | Description | Example |
+|----------|-------------|----------------|
+| `{{$randomPhoneNumber}}` | A random ten-digit phone number | `555-987-6543` |
+| `{{$randomPhoneNumberExt}}` | A random phone number with extension | `555-456-7890 x321` |
+| `{{$randomCity}}` | A random city name | `Riverside` |
+| `{{$randomStreetName}}` | A random street name | `Oak Avenue` |
+| `{{$randomStreetAddress}}` | A random street address | `456 Elm Drive` |
+| `{{$randomCountry}}` | A random country | `Canada` |
+| `{{$randomCountryCode}}` | A random two-letter country code (ISO 3166-1 alpha-2) | `US` |
+| `{{$randomLatitude}}` | A random latitude coordinate | `-23.5475` |
+| `{{$randomLongitude}}` | A random longitude coordinate | `151.2095` |
+
+### Images
+
+| Variable | Description | Example |
+|----------|-------------|----------------|
+| `{{$randomAvatarImage}}` | A random avatar image | `https://example.com/avatar/512x512` |
+| `{{$randomImageUrl}}` | A URL of a random image | `https://example.com/images/640/480` |
+| `{{$randomAbstractImage}}` | A URL of a random abstract image | `https://loremflickr.com/640/480/abstract` |
+| `{{$randomAnimalsImage}}` | A URL of a random animal image | `https://loremflickr.com/640/480/animals` |
+| `{{$randomBusinessImage}}` | A URL of a random stock business image | `https://loremflickr.com/640/480/business` |
+| `{{$randomCatsImage}}` | A URL of a random cat image | `https://loremflickr.com/640/480/cats` |
+| `{{$randomCityImage}}` | A URL of a random city image | `https://loremflickr.com/640/480/city` |
+| `{{$randomFoodImage}}` | A URL of a random food image | `https://loremflickr.com/640/480/food` |
+| `{{$randomNightlifeImage}}` | A URL of a random nightlife image | `https://loremflickr.com/640/480/nightlife` |
+| `{{$randomFashionImage}}` | A URL of a random fashion image | `https://loremflickr.com/640/480/fashion` |
+| `{{$randomPeopleImage}}` | A URL of a random image of a person | `https://loremflickr.com/640/480/people` |
+| `{{$randomNatureImage}}` | A URL of a random nature image | `https://loremflickr.com/640/480/nature` |
+| `{{$randomSportsImage}}` | A URL of a random sports image | `https://loremflickr.com/640/480/sports` |
+| `{{$randomTransportImage}}` | A URL of a random transportation image | `https://loremflickr.com/640/480/transport` |
+| `{{$randomImageDataUri}}` | A random image data URI | `data:image/svg+xml;charset=UTF-8...` |
+
+### Finance
+
+| Variable | Description | Example |
+|----------|-------------|----------------|
+| `{{$randomBankAccount}}` | A random 8-digit bank account number | `78945612` |
+| `{{$randomBankAccountName}}` | A random bank account name | `Savings Account` |
+| `{{$randomCreditCardMask}}` | A random masked credit card number | `1234` |
+| `{{$randomBankAccountBic}}` | A random BIC (Bank Identifier Code) | `DEUTDEFF` |
+| `{{$randomBankAccountIban}}` | A random 15-31 character IBAN | `GB82WEST12345698765432` |
+| `{{$randomTransactionType}}` | A random transaction type | `payment` |
+| `{{$randomCurrencyCode}}` | A random 3-letter currency code (ISO-4217) | `EUR` |
+| `{{$randomCurrencyName}}` | A random currency name | `US Dollar` |
+| `{{$randomCurrencySymbol}}` | A random currency symbol | `€` |
+| `{{$randomBitcoin}}` | A random bitcoin address | `1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa` |
+
+### Business
+
+| Variable | Description | Example |
+|----------|-------------|----------------|
+| `{{$randomCompanyName}}` | A random company name | `TechStart Solutions` |
+| `{{$randomCompanySuffix}}` | A random company suffix | `LLC` |
+| `{{$randomBs}}` | A random phrase of business-speak | `streamline innovative platforms` |
+| `{{$randomBsAdjective}}` | A random business-speak adjective | `dynamic` |
+| `{{$randomBsBuzz}}` | A random business-speak buzzword | `optimize` |
+| `{{$randomBsNoun}}` | A random business-speak noun | `solutions` |
+
+### Catchphrases
+
+| Variable | Description | Example |
+|----------|-------------|----------------|
+| `{{$randomCatchPhrase}}` | A random catchphrase | `Innovative scalable methodology` |
+| `{{$randomCatchPhraseAdjective}}` | A random catchphrase adjective | `Robust` |
+| `{{$randomCatchPhraseDescriptor}}` | A random catchphrase descriptor | `cloud-based` |
+| `{{$randomCatchPhraseNoun}}` | A random catchphrase noun | `framework` |
+
+### Databases
+
+| Variable | Description | Example |
+|----------|-------------|----------------|
+| `{{$randomDatabaseColumn}}` | A random database column name | `userId` |
+| `{{$randomDatabaseType}}` | A random database type | `varchar` |
+| `{{$randomDatabaseCollation}}` | A random database collation | `utf8_unicode_ci` |
+| `{{$randomDatabaseEngine}}` | A random database engine | `InnoDB` |
+
+### Dates
+
+| Variable | Description | Example |
+|----------|-------------|----------------|
+| `{{$randomDateFuture}}` | A random future datetime | `2027-11-05T18:30:22.000Z` |
+| `{{$randomDatePast}}` | A random past datetime | `2023-08-14T15:45:33.000Z` |
+| `{{$randomDateRecent}}` | A random recent datetime | `2026-02-07T10:20:15.000Z` |
+| `{{$randomWeekday}}` | A random weekday | `Monday` |
+| `{{$randomMonth}}` | A random month | `September` |
+
+### Domains, Emails and Usernames
+
+| Variable | Description | Example |
+|----------|-------------|----------------|
+| `{{$randomDomainName}}` | A random domain name | `test-site.net` |
+| `{{$randomDomainSuffix}}` | A random domain suffix | `org` |
+| `{{$randomDomainWord}}` | A random unqualified domain name | `sample` |
+| `{{$randomEmail}}` | A random email address | `sample@gmail.com` |
+| `{{$randomExampleEmail}}` | A random email address from an example domain | `alex.johnson@example.org` |
+| `{{$randomUserName}}` | A random username | `techuser2024` |
+| `{{$randomUrl}}` | A random URL | `https://demo-website.io` |
+
+### Files and Directories
+
+| Variable | Description | Example |
+|----------|-------------|----------------|
+| `{{$randomSemver}}` | A random semantic version number | `3.12.4` |
+| `{{$randomFileName}}` | A random file name (includes uncommon extensions) | `report_2024.pdf` |
+| `{{$randomFileType}}` | A random file type (includes uncommon file types) | `video` |
+| `{{$randomFileExt}}` | A random file extension (includes uncommon extensions) | `csv` |
+| `{{$randomCommonFileName}}` | A random file name | `presentation.pptx` |
+| `{{$randomCommonFileType}}` | A random, common file type | `image` |
+| `{{$randomCommonFileExt}}` | A random, common file extension | `jpg` |
+| `{{$randomFilePath}}` | A random file path | `/var/www/html/index.html` |
+| `{{$randomDirectoryPath}}` | A random directory path | `/opt/apps` |
+| `{{$randomMimeType}}` | A random MIME type | `image/jpeg` |
+
+### Stores
+
+| Variable | Description | Example |
+|----------|-------------|----------------|
+| `{{$randomPrice}}` | A random price between 0.00 and 1000.00 | `247.99` |
+| `{{$randomProduct}}` | A random product | `Shoes` |
+| `{{$randomProductAdjective}}` | A random product adjective | `Premium` |
+| `{{$randomProductMaterial}}` | A random product material | `Cotton` |
+| `{{$randomProductName}}` | A random product name | `Ergonomic Wooden Chair` |
+| `{{$randomDepartment}}` | A random commerce category | `Electronics` |
+
+### Grammar
+
+| Variable | Description | Example |
+|----------|-------------|----------------|
+| `{{$randomNoun}}` | A random noun | `network` |
+| `{{$randomVerb}}` | A random verb | `generate` |
+| `{{$randomIngverb}}` | A random verb ending in -ing | `processing` |
+| `{{$randomAdjective}}` | A random adjective | `efficient` |
+| `{{$randomWord}}` | A random word | `system` |
+| `{{$randomWords}}` | Some random words | `quick brown fox jumps high` |
+| `{{$randomPhrase}}` | A random phrase | `Try to compress the TCP protocol...` |
+
+### Lorem Ipsum
+
+| Variable | Description | Example |
+|----------|-------------|----------------|
+| `{{$randomLoremWord}}` | A random word of lorem ipsum text | `ipsum` |
+| `{{$randomLoremWords}}` | Some random words of lorem ipsum text | `dolor sit amet` |
+| `{{$randomLoremSentence}}` | A random sentence of lorem ipsum text | `Sed ut perspiciatis unde omnis iste natus.` |
+| `{{$randomLoremSentences}}` | A random 2 to 6 sentences of lorem ipsum text | `Nemo enim ipsam voluptatem...` |
+| `{{$randomLoremParagraph}}` | A random paragraph of lorem ipsum text | `Lorem ipsum dolor sit amet...` |
+| `{{$randomLoremParagraphs}}` | 3 random paragraphs of lorem ipsum text | `Voluptatem rem magnam...` |
+| `{{$randomLoremText}}` | A random amount of lorem ipsum text | `Temporibus autem quibusdam...` |
+| `{{$randomLoremSlug}}` | A random lorem ipsum URL slug | `lorem-ipsum-dolor` |
+| `{{$randomLoremLines}}` | 1 to 7 random lines of lorem ipsum | `Sed ut perspiciatis unde...` |
+
+## Variables with arguments
+
+The following dynamic variables support optional arguments for customization. Use the handlebars hash syntax to pass arguments.
+
+### Common
+
+
+
+ **Arguments:** `version` (`4`|`7`), `refDate`
+
+
+
+ ```javascript
+ {{$guid 7}}
+ {{$guid 4 "2026-01-01"}}
+ ```
+
+
+ ```javascript
+ rq.$guid(7)
+ rq.$guid(4, "2026-01-01")
+ ```
+
+
+
+
+
+ **Arguments:** `version` (`4`|`7`), `refDate`
+
+
+
+ ```javascript
+ {{$randomUUID 7}}
+ {{$randomUUID 4 "2026-01-01"}}
+ ```
+
+
+ ```javascript
+ rq.$randomUUID(7)
+ rq.$randomUUID(4, "2026-01-01")
+ ```
+
+
+
+
+
+### Text, Numbers and Colors
+
+
+
+ **Arguments:** `length | (min max)`, `casing` (`upper`|`lower`|`mixed`), `exclude`
+
+
+
+ ```javascript
+ {{$randomAlphaNumeric 5}}
+ {{$randomAlphaNumeric 3 8 "upper"}}
+ ```
+
+
+ ```javascript
+ rq.$randomAlphaNumeric(5)
+ rq.$randomAlphaNumeric(3, 8, "upper")
+ ```
+
+
+
+
+
+ **Arguments:** `probability` (`0-1`)
+
+
+
+ ```javascript
+ {{$randomBoolean 0.8}}
+ ```
+
+
+ ```javascript
+ rq.$randomBoolean(0.8)
+ ```
+
+
+
+
+
+ **Arguments:** `max | (min max)`, `multipleOf`
+
+
+
+ ```javascript
+ {{$randomInt 100}}
+ {{$randomInt 1 100}}
+ {{$randomInt 0 100 5}}
+ ```
+
+
+ ```javascript
+ rq.$randomInt(100)
+ rq.$randomInt(1, 100)
+ rq.$randomInt(0, 100, 5)
+ ```
+
+
+
+
+
+ **Arguments:** `format` (`hex`|`css`|`binary`), `includeAlpha` (`true`|`false`), `prefix`, `casing` (`upper`|`lower`|`mixed`)
+
+
+
+ ```javascript
+ {{$randomHexColor "css"}}
+ {{$randomHexColor "hex" "true" "#" "upper"}}
+ ```
+
+
+ ```javascript
+ rq.$randomHexColor("css")
+ rq.$randomHexColor("hex", "true", "#", "upper")
+ ```
+
+
+
+
+
+### Internet and IP Addresses
+
+
+
+ **Arguments:** `cidrBlock | network`
+
+
+
+ ```javascript
+ {{$randomIP "192.168.0.0/16"}}
+ ```
+
+
+ ```javascript
+ rq.$randomIP("192.168.0.0/16")
+ ```
+
+
+
+
+
+ **Arguments:** `separator`
+
+
+
+ ```javascript
+ {{$randomMACAddress "-"}}
+ ```
+
+
+ ```javascript
+ rq.$randomMACAddress("-")
+ ```
+
+
+
+
+
+ **Arguments:** `length`, `memorable` (`true`|`false`), `pattern`, `prefix`
+
+
+
+ ```javascript
+ {{$randomPassword 20}}
+ {{$randomPassword 12 "true"}}
+ ```
+
+
+ ```javascript
+ rq.$randomPassword(20)
+ rq.$randomPassword(12, "true")
+ ```
+
+
+
+
+
+### Names
+
+
+
+ **Arguments:** `gender` (`male`|`female`)
+
+
+
+ ```javascript
+ {{$randomFirstName "male"}}
+ ```
+
+
+ ```javascript
+ rq.$randomFirstName("male")
+ ```
+
+
+
+
+
+ **Arguments:** `gender` (`male`|`female`)
+
+
+
+ ```javascript
+ {{$randomLastName "female"}}
+ ```
+
+
+ ```javascript
+ rq.$randomLastName("female")
+ ```
+
+
+
+
+
+ **Arguments:** `gender` (`male`|`female`)
+
+
+
+ ```javascript
+ {{$randomFullName "male"}}
+ ```
+
+
+ ```javascript
+ rq.$randomFullName("male")
+ ```
+
+
+
+
+
+ **Arguments:** `gender` (`male`|`female`)
+
+
+
+ ```javascript
+ {{$randomNamePrefix "female"}}
+ ```
+
+
+ ```javascript
+ rq.$randomNamePrefix("female")
+ ```
+
+
+
+
+
+### Phone, Address and Location
+
+
+
+ **Arguments:** `style` (`human`|`national`|`international`)
+
+
+
+ ```javascript
+ {{$randomPhoneNumber "international"}}
+ ```
+
+
+ ```javascript
+ rq.$randomPhoneNumber("international")
+ ```
+
+
+
+
+
+ **Arguments:** `useFullAddress` (`true`|`false`)
+
+
+
+ ```javascript
+ {{$randomStreetAddress "true"}}
+ ```
+
+
+ ```javascript
+ rq.$randomStreetAddress("true")
+ ```
+
+
+
+
+
+ **Arguments:** `variant` (`alpha-2`|`alpha-3`|`numeric`)
+
+
+
+ ```javascript
+ {{$randomCountryCode "alpha-3"}}
+ ```
+
+
+ ```javascript
+ rq.$randomCountryCode("alpha-3")
+ ```
+
+
+
+
+
+ **Arguments:** `max | (min max)`, `precision`
+
+
+
+ ```javascript
+ {{$randomLatitude 50}}
+ {{$randomLatitude -10 50 4}}
+ ```
+
+
+ ```javascript
+ rq.$randomLatitude(50)
+ rq.$randomLatitude(-10, 50, 4)
+ ```
+
+
+
+
+
+ **Arguments:** `max | (min max)`, `precision`
+
+
+
+ ```javascript
+ {{$randomLongitude 100}}
+ {{$randomLongitude -100 100 4}}
+ ```
+
+
+ ```javascript
+ rq.$randomLongitude(100)
+ rq.$randomLongitude(-100, 100, 4)
+ ```
+
+
+
+
+
+### Images
+
+
+
+ **Arguments:** `width`, `height`
+
+
+
+ ```javascript
+ {{$randomImageUrl 800 600}}
+ ```
+
+
+ ```javascript
+ rq.$randomImageUrl(800, 600)
+ ```
+
+
+
+
+
+ **Arguments:** `width`, `height`, `color`, `type` (`svg-uri`|`svg-base64`)
+
+
+
+ ```javascript
+ {{$randomImageDataUri 200 200 "blue" "svg-base64"}}
+ ```
+
+
+ ```javascript
+ rq.$randomImageDataUri(200, 200, "blue", "svg-base64")
+ ```
+
+
+
+
+
+### Finance
+
+
+
+ **Arguments:** `length` (default `8`)
+
+
+
+ ```javascript
+ {{$randomBankAccount 10}}
+ ```
+
+
+ ```javascript
+ rq.$randomBankAccount(10)
+ ```
+
+
+
+
+
+ **Arguments:** `issuer`
+
+
+
+ ```javascript
+ {{$randomCreditCardMask "visa"}}
+ ```
+
+
+ ```javascript
+ rq.$randomCreditCardMask("visa")
+ ```
+
+
+
+
+
+ **Arguments:** `includeBranchCode` (`true`|`false`)
+
+
+
+ ```javascript
+ {{$randomBankAccountBic "true"}}
+ ```
+
+
+ ```javascript
+ rq.$randomBankAccountBic("true")
+ ```
+
+
+
+
+
+ **Arguments:** `formatted` (`true`|`false`), `countryCode`
+
+
+
+ ```javascript
+ {{$randomBankAccountIban "true" "DE"}}
+ ```
+
+
+ ```javascript
+ rq.$randomBankAccountIban("true", "DE")
+ ```
+
+
+
+
+
+ **Arguments:** `type` (`legacy`|`segwit`|`bech32`), `network` (`mainnet`|`testnet`)
+
+
+
+ ```javascript
+ {{$randomBitcoin "segwit" "mainnet"}}
+ ```
+
+
+ ```javascript
+ rq.$randomBitcoin("segwit", "mainnet")
+ ```
+
+
+
+
+
+### Dates
+
+
+
+ **Arguments:** `years`, `refDate`
+
+
+
+ ```javascript
+ {{$randomDateFuture 5}}
+ {{$randomDateFuture 2 "2025-01-01"}}
+ ```
+
+
+ ```javascript
+ rq.$randomDateFuture(5)
+ rq.$randomDateFuture(2, "2025-01-01")
+ ```
+
+
+
+
+
+ **Arguments:** `years`, `refDate`
+
+
+
+ ```javascript
+ {{$randomDatePast 3}}
+ {{$randomDatePast 1 "2024-06-01"}}
+ ```
+
+
+ ```javascript
+ rq.$randomDatePast(3)
+ rq.$randomDatePast(1, "2024-06-01")
+ ```
+
+
+
+
+
+ **Arguments:** `days`, `refDate`
+
+
+
+ ```javascript
+ {{$randomDateRecent 7}}
+ {{$randomDateRecent 30 "2026-01-01"}}
+ ```
+
+
+ ```javascript
+ rq.$randomDateRecent(7)
+ rq.$randomDateRecent(30, "2026-01-01")
+ ```
+
+
+
+
+
+ **Arguments:** `abbreviated` (`true`|`false`), `context` (`true`|`false`)
+
+
+
+ ```javascript
+ {{$randomWeekday "true"}}
+ ```
+
+
+ ```javascript
+ rq.$randomWeekday("true")
+ ```
+
+
+
+
+
+ **Arguments:** `abbreviated` (`true`|`false`), `context` (`true`|`false`)
+
+
+
+ ```javascript
+ {{$randomMonth "true"}}
+ ```
+
+
+ ```javascript
+ rq.$randomMonth("true")
+ ```
+
+
+
+
+
+### Domains, Emails and Usernames
+
+
+
+ **Arguments:** `firstName`, `lastName`, `provider`, `allowSpecialCharacters` (`true`|`false`)
+
+
+
+ ```javascript
+ {{$randomEmail "John"}}
+ {{$randomEmail "John" "Doe" "gmail.com"}}
+ ```
+
+
+ ```javascript
+ rq.$randomEmail("John")
+ rq.$randomEmail("John", "Doe", "gmail.com")
+ ```
+
+
+
+
+
+ **Arguments:** `firstName`, `lastName`, `allowSpecialCharacters` (`true`|`false`)
+
+
+
+ ```javascript
+ {{$randomExampleEmail "John" "Doe"}}
+ ```
+
+
+ ```javascript
+ rq.$randomExampleEmail("John", "Doe")
+ ```
+
+
+
+
+
+ **Arguments:** `firstName`, `lastName`
+
+
+
+ ```javascript
+ {{$randomUserName "John" "Doe"}}
+ ```
+
+
+ ```javascript
+ rq.$randomUserName("John", "Doe")
+ ```
+
+
+
+
+
+ **Arguments:** `protocol` (`http`|`https`), `appendSlash` (`true`|`false`)
+
+
+
+ ```javascript
+ {{$randomUrl "https" "true"}}
+ ```
+
+
+ ```javascript
+ rq.$randomUrl("https", "true")
+ ```
+
+
+
+
+
+### Files and Directories
+
+
+
+ **Arguments:** `extensionCount | (min max)`
+
+
+
+ ```javascript
+ {{$randomFileName 2}}
+ {{$randomFileName 1 3}}
+ ```
+
+
+ ```javascript
+ rq.$randomFileName(2)
+ rq.$randomFileName(1, 3)
+ ```
+
+
+
+
+
+ **Arguments:** `mimeType`
+
+
+
+ ```javascript
+ {{$randomFileExt "image/jpeg"}}
+ ```
+
+
+ ```javascript
+ rq.$randomFileExt("image/jpeg")
+ ```
+
+
+
+
+
+### Stores
+
+
+
+ **Arguments:** `max | (min max)`, `dec`, `symbol`
+
+
+
+ ```javascript
+ {{$randomPrice 500}}
+ {{$randomPrice 10 100 2 "$"}}
+ ```
+
+
+ ```javascript
+ rq.$randomPrice(500)
+ rq.$randomPrice(10, 100, 2, "$")
+ ```
+
+
+
+
+
+### Grammar
+
+
+
+ **Arguments:** `length | (min max)`, `strategy` (`fail`|`closest`|`shortest`|`longest`|`any-length`)
+
+
+
+ ```javascript
+ {{$randomNoun 5}}
+ {{$randomNoun 3 8 "closest"}}
+ ```
+
+
+ ```javascript
+ rq.$randomNoun(5)
+ rq.$randomNoun(3, 8, "closest")
+ ```
+
+
+
+
+
+ **Arguments:** `length | (min max)`, `strategy` (`fail`|`closest`|`shortest`|`longest`|`any-length`)
+
+
+
+ ```javascript
+ {{$randomVerb 5}}
+ {{$randomVerb 3 8 "closest"}}
+ ```
+
+
+ ```javascript
+ rq.$randomVerb(5)
+ rq.$randomVerb(3, 8, "closest")
+ ```
+
+
+
+
+
+ **Arguments:** `length | (min max)`, `strategy` (`fail`|`closest`|`shortest`|`longest`|`any-length`)
+
+
+
+ ```javascript
+ {{$randomAdjective 5}}
+ {{$randomAdjective 3 8 "closest"}}
+ ```
+
+
+ ```javascript
+ rq.$randomAdjective(5)
+ rq.$randomAdjective(3, 8, "closest")
+ ```
+
+
+
+
+
+ **Arguments:** `length | (min max)`, `strategy` (`fail`|`closest`|`shortest`|`longest`|`any-length`)
+
+
+
+ ```javascript
+ {{$randomWord 5}}
+ {{$randomWord 3 8 "closest"}}
+ ```
+
+
+ ```javascript
+ rq.$randomWord(5)
+ rq.$randomWord(3, 8, "closest")
+ ```
+
+
+
+
+
+ **Arguments:** `count | (min max)`
+
+
+
+ ```javascript
+ {{$randomWords 3}}
+ {{$randomWords 2 5}}
+ ```
+
+
+ ```javascript
+ rq.$randomWords(3)
+ rq.$randomWords(2, 5)
+ ```
+
+
+
+
+
+### Lorem Ipsum
+
+
+
+ **Arguments:** `length | (min max)`, `strategy` (`fail`|`closest`|`shortest`|`longest`|`any-length`)
+
+
+
+ ```javascript
+ {{$randomLoremWord 5}}
+ {{$randomLoremWord 3 8 "closest"}}
+ ```
+
+
+ ```javascript
+ rq.$randomLoremWord(5)
+ rq.$randomLoremWord(3, 8, "closest")
+ ```
+
+
+
+
+
+ **Arguments:** `count | (min max)`
+
+
+
+ ```javascript
+ {{$randomLoremWords 5}}
+ {{$randomLoremWords 3 7}}
+ ```
+
+
+ ```javascript
+ rq.$randomLoremWords(5)
+ rq.$randomLoremWords(3, 7)
+ ```
+
+
+
+
+
+ **Arguments:** `wordCount | (min max)`
+
+
+
+ ```javascript
+ {{$randomLoremSentence 10}}
+ {{$randomLoremSentence 5 12}}
+ ```
+
+
+ ```javascript
+ rq.$randomLoremSentence(10)
+ rq.$randomLoremSentence(5, 12)
+ ```
+
+
+
+
+
+ **Arguments:** `count | (min max)`, `separator`
+
+
+
+ ```javascript
+ {{$randomLoremSentences 3}}
+ {{$randomLoremSentences 2 5}}
+ ```
+
+
+ ```javascript
+ rq.$randomLoremSentences(3)
+ rq.$randomLoremSentences(2, 5)
+ ```
+
+
+
+
+
+ **Arguments:** `sentenceCount | (min max)`
+
+
+
+ ```javascript
+ {{$randomLoremParagraph 5}}
+ {{$randomLoremParagraph 3 7}}
+ ```
+
+
+ ```javascript
+ rq.$randomLoremParagraph(5)
+ rq.$randomLoremParagraph(3, 7)
+ ```
+
+
+
+
+
+ **Arguments:** `count | (min max)`, `separator`
+
+
+
+ ```javascript
+ {{$randomLoremParagraphs 5}}
+ {{$randomLoremParagraphs 2 4}}
+ ```
+
+
+ ```javascript
+ rq.$randomLoremParagraphs(5)
+ rq.$randomLoremParagraphs(2, 4)
+ ```
+
+
+
+
+
+ **Arguments:** `count | (min max)`
+
+
+
+ ```javascript
+ {{$randomLoremSlug 5}}
+ {{$randomLoremSlug 2 4}}
+ ```
+
+
+ ```javascript
+ rq.$randomLoremSlug(5)
+ rq.$randomLoremSlug(2, 4)
+ ```
+
+
+
+
+
+ **Arguments:** `count | (min max)`
+
+
+
+ ```javascript
+ {{$randomLoremLines 3}}
+ {{$randomLoremLines 2 5}}
+ ```
+
+
+ ```javascript
+ rq.$randomLoremLines(3)
+ rq.$randomLoremLines(2, 5)
+ ```
+
+
+
+
+
+## What's Next?
+
+
+
+ Store and manage auth tokens securely with variables
+
+
+ Use temporary variables for request execution
+
+
+
diff --git a/general/api-client/environments-and-variables/variable-precedence.mdx b/general/api-client/environments-and-variables/variable-precedence.mdx
index fcbaed0..6d0e38d 100644
--- a/general/api-client/environments-and-variables/variable-precedence.mdx
+++ b/general/api-client/environments-and-variables/variable-precedence.mdx
@@ -10,7 +10,11 @@ Variable precedence in Requestly defines how a variable value is resolved when t
## Precedence order
-> Runtime Variables → Environment Variables → SubCollection Variables → Collection Variables → Global Variables
+> Runtime Variables → Environment Variables → SubCollection Variables → Collection Variables → Global Variables → Dynamic Variables
+
+
+**Dynamic variables** are built-in variables (like `{{$timestamp}}`, `{{$randomUUID}}`, etc.) that have the lowest precedence. If you define a custom variable with the same name, your custom value will be used.
+
## How it works
@@ -35,11 +39,17 @@ if (variable_name in runtime_variables) { // Check runtime
return collection_variables[variable_name];
} else if (variable_name in global_variables) { // Check global
return global_variables[variable_name];
+} else if (is_dynamic_variable(variable_name)) { // Check dynamic variables
+ return generate_dynamic_value(variable_name); // e.g., $timestamp, $randomUUID
} else {
return null; // Variable not found in any scope
}
```
+
+When using the `$` prefix (e.g., `{{$timestamp}}`), the system skips user-defined variable lookups and directly generates the dynamic value.
+
+
## Example scenario
Assume the variable `{{base_url}}` is defined in multiple scopes:
@@ -56,4 +66,36 @@ If you send a request inside a **SubCollection** with an active **Environment**,
`https://runtime.api.com`
-If the runtime variable is removed, the value falls back to the **environment variable**, followed by SubCollection, Collection, and finally Global based on availability.
\ No newline at end of file
+If the runtime variable is removed, the value falls back to the **environment variable**, followed by SubCollection, Collection, and finally Global based on availability.
+
+## Dynamic variables precedence example
+
+Assume you want to use a timestamp in your request:
+
+**Scenario 1: Using `{{timestamp}}`** (without `$` prefix)
+
+| Scope | Value (if defined) |
+| ------------- | ---------------------------- |
+| Environment | `"2024-01-15"` |
+| Dynamic | Current timestamp (e.g., `1613360320`) |
+
+Result: `{{timestamp}}` resolves to `"2024-01-15"` (your custom environment variable)
+
+**Scenario 2: Using `{{$timestamp}}`** (with `$` prefix)
+
+Result: `{{$timestamp}}` **always** resolves to the current Unix timestamp (e.g., `1613360320`), regardless of whether you have a custom `timestamp` variable defined.
+
+**Best Practice:**
+
+```javascript
+// In pre-request script
+// This uses your custom variable if defined, otherwise falls back to dynamic
+const myTimestamp = "{{timestamp}}";
+
+// This always generates a fresh dynamic timestamp
+const freshTimestamp = rq.$timestamp();
+```
+
+
+Use the `$` prefix (`{{$variableName}}` or `rq.$variableName()`) when you explicitly want to use a dynamic variable, even if a custom variable with the same name exists.
+
\ No newline at end of file
diff --git a/general/api-client/scripts.mdx b/general/api-client/scripts.mdx
index c580713..d3bb5e3 100644
--- a/general/api-client/scripts.mdx
+++ b/general/api-client/scripts.mdx
@@ -247,12 +247,44 @@ console.log(`Weather in ${city}: ${temp}°C`);
----
-### Variable Scope Hierarchy
+### Using Dynamic Variables in Scripts
-When variables with the same name exist at multiple levels, the priority is:
+Requestly provides dynamic variables, which are built in values that automatically generate common data such as timestamps, UUIDs, and random values. You can access them in scripts using the rq.$variableName() syntax.
-**Environment Variables > Collection Variables > Global Variables**
+**Quick Example:**
+```jsx
+const uniqueId = rq.$randomUUID();
+const timestamp = rq.$timestamp();
+const email = rq.$randomEmail();
+
+console.log("Generated User ID:", uniqueId);
+console.log("Request Timestamp:", timestamp);
+```
+
+**Common Dynamic Variables:**
+- `rq.$randomUUID()` - Generate unique identifiers
+- `rq.$timestamp()` - Current Unix timestamp
+- `rq.$isoTimestamp()` - ISO 8601 timestamp
+- `rq.$randomInt()` - Random integer
+- `rq.$randomEmail()` - Random email address
+- `rq.$randomFirstName()` - Random first name
+- `rq.$randomCompanyName()` - Random company name
+
+**With Arguments:**
+```jsx
+// Generate random integer between 1-100
+const age = rq.$randomInt(1, 100);
+
+// Generate alphanumeric string of length 10
+const code = rq.$randomAlphaNumeric(10);
+
+// Generate password with specific length
+const password = rq.$randomPassword("20");
+
+// Generate email with custom name
+const email = rq.$randomEmail("John", "Doe");
+```
-This allows you to override global or collection defaults with environment-specific values.
+[View complete Dynamic Variables documentation →](/general/api-client/environments-and-variables/dynamic-variables)
diff --git a/images/dynamic-variables/dynamic-variables-generate-random-user-data.png b/images/dynamic-variables/dynamic-variables-generate-random-user-data.png
new file mode 100644
index 0000000..124addb
Binary files /dev/null and b/images/dynamic-variables/dynamic-variables-generate-random-user-data.png differ
diff --git a/images/dynamic-variables/dynamic-variables-headers-with-dynamic-values.png b/images/dynamic-variables/dynamic-variables-headers-with-dynamic-values.png
new file mode 100644
index 0000000..a785306
Binary files /dev/null and b/images/dynamic-variables/dynamic-variables-headers-with-dynamic-values.png differ
diff --git a/images/dynamic-variables/dynamic-variables-in-pre-request.png b/images/dynamic-variables/dynamic-variables-in-pre-request.png
new file mode 100644
index 0000000..3f12783
Binary files /dev/null and b/images/dynamic-variables/dynamic-variables-in-pre-request.png differ
diff --git a/images/dynamic-variables/dynamic-variables-url-with-random-query-parameter.png b/images/dynamic-variables/dynamic-variables-url-with-random-query-parameter.png
new file mode 100644
index 0000000..041f43f
Binary files /dev/null and b/images/dynamic-variables/dynamic-variables-url-with-random-query-parameter.png differ