Skip to content

Variables

HarborClient supports dynamic variables — Postman-compatible placeholders whose values are generated fresh each time a request is sent. Use them in {{$name}} syntax in:

  • Request URLs
  • Headers and query params
  • Request body
  • Auth fields

Dynamic variable names are case-sensitive and include the leading $. Each placeholder resolves to a new value on every send. The set is backed by @faker-js/faker for randomized sample data.

Static vs dynamic variables

Collection and environment variables use {{key}} syntax without a $ prefix. You define the key and value yourself in collection or environment settings.

Dynamic variables use {{$name}} syntax. HarborClient generates the value at send time — you do not store it in a variable table.

Static variables take precedence. If you define a collection or environment variable with the same key as a dynamic variable (for example $randomInt), the static value is used instead. See Environments for merge order and precedence.

Using dynamic variables in scripts

In pre- and post-request scripts, use hc.variables.replaceIn() to resolve placeholders in a string. See Request scripts for the full hc.variables API.

javascript
hc.request.url = hc.variables.replaceIn('https://api.example.com/users/{{$guid}}');
console.log(hc.variables.replaceIn('Email: {{$randomEmail}}'));

Dynamic variable reference

Common

VariableDescription
{{$guid}}A uuid-v4 style guid
{{$timestamp}}The current UNIX timestamp in seconds
{{$isoTimestamp}}The current ISO timestamp at zero UTC
{{$randomUUID}}A random 36-character UUID

Text, numbers, and colors

VariableDescription
{{$randomAlphaNumeric}}A random alpha-numeric character
{{$randomBoolean}}A random boolean value
{{$randomInt}}A random integer between 0 and 1000
{{$randomColor}}A random color name
{{$randomHexColor}}A random hex color value
{{$randomAbbreviation}}A random abbreviation

Internet and IP addresses

VariableDescription
{{$randomIP}}A random IPv4 address
{{$randomIPV6}}A random IPv6 address
{{$randomMACAddress}}A random MAC address
{{$randomPassword}}A random 15-character alpha-numeric password
{{$randomLocale}}A random two-letter language code (ISO 639-1)
{{$randomUserAgent}}A random user agent string
{{$randomProtocol}}A random internet protocol
{{$randomSemver}}A random semantic version number

Names

VariableDescription
{{$randomFirstName}}A random first name
{{$randomLastName}}A random last name
{{$randomFullName}}A random first and last name
{{$randomNamePrefix}}A random name prefix
{{$randomNameSuffix}}A random name suffix

Profession

VariableDescription
{{$randomJobArea}}A random job area
{{$randomJobDescriptor}}A random job descriptor
{{$randomJobTitle}}A random job title
{{$randomJobType}}A random job type

Phone, address, and location

VariableDescription
{{$randomPhoneNumber}}A random ten-digit phone number
{{$randomPhoneNumberExt}}A random phone number with extension
{{$randomCity}}A random city name
{{$randomStreetName}}A random street name
{{$randomStreetAddress}}A random street address
{{$randomCountry}}A random country name
{{$randomCountryCode}}A random two-letter country code (ISO 3166-1 alpha-2)
{{$randomLatitude}}A random latitude coordinate
{{$randomLongitude}}A random longitude coordinate

Images

VariableDescription
{{$randomAvatarImage}}A random avatar image URL
{{$randomImageUrl}}A URL of a random image
{{$randomAbstractImage}}A URL of a random abstract image
{{$randomAnimalsImage}}A URL of a random animal image
{{$randomBusinessImage}}A URL of a random stock business image
{{$randomCatsImage}}A URL of a random cat image
{{$randomCityImage}}A URL of a random city image
{{$randomFoodImage}}A URL of a random food image
{{$randomNightlifeImage}}A URL of a random nightlife image
{{$randomFashionImage}}A URL of a random fashion image
{{$randomPeopleImage}}A URL of a random image of a person
{{$randomNatureImage}}A URL of a random nature image
{{$randomSportsImage}}A URL of a random sports image
{{$randomTransportImage}}A URL of a random transportation image
{{$randomImageDataUri}}A random image data URI

Finance

VariableDescription
{{$randomBankAccount}}A random 8-digit bank account number
{{$randomBankAccountName}}A random bank account name
{{$randomCreditCardMask}}A random masked credit card number (last four digits)
{{$randomBankAccountBic}}A random BIC (Bank Identifier Code)
{{$randomBankAccountIban}}A random IBAN (International Bank Account Number)
{{$randomTransactionType}}A random transaction type
{{$randomCurrencyCode}}A random 3-letter currency code (ISO-4217)
{{$randomCurrencyName}}A random currency name
{{$randomCurrencySymbol}}A random currency symbol
{{$randomBitcoin}}A random bitcoin address

Business

VariableDescription
{{$randomCompanyName}}A random company name
{{$randomCompanySuffix}}A random company suffix
{{$randomBs}}A random phrase of business-speak
{{$randomBsAdjective}}A random business-speak adjective
{{$randomBsBuzz}}A random business-speak buzzword
{{$randomBsNoun}}A random business-speak noun

Catchphrases

VariableDescription
{{$randomCatchPhrase}}A random catchphrase
{{$randomCatchPhraseAdjective}}A random catchphrase adjective
{{$randomCatchPhraseDescriptor}}A random catchphrase descriptor
{{$randomCatchPhraseNoun}}A random catchphrase noun

Databases

VariableDescription
{{$randomDatabaseColumn}}A random database column name
{{$randomDatabaseType}}A random database type
{{$randomDatabaseCollation}}A random database collation
{{$randomDatabaseEngine}}A random database engine

Dates

VariableDescription
{{$randomDateFuture}}A random future datetime
{{$randomDatePast}}A random past datetime
{{$randomDateRecent}}A random recent datetime
{{$randomWeekday}}A random weekday name
{{$randomMonth}}A random month name

Domains, emails, and usernames

VariableDescription
{{$randomDomainName}}A random domain name
{{$randomDomainSuffix}}A random domain suffix
{{$randomDomainWord}}A random unqualified domain name
{{$randomEmail}}A random email address
{{$randomExampleEmail}}A random email address from an example domain
{{$randomUserName}}A random username
{{$randomUrl}}A random URL

Files and directories

VariableDescription
{{$randomFileName}}A random file name
{{$randomFileType}}A random file type
{{$randomFileExt}}A random file extension
{{$randomCommonFileName}}A random common file name
{{$randomCommonFileType}}A random common file type
{{$randomCommonFileExt}}A random common file extension
{{$randomFilePath}}A random file path
{{$randomDirectoryPath}}A random directory path
{{$randomMimeType}}A random MIME type

Stores

VariableDescription
{{$randomPrice}}A random price between 0.00 and 1000.00
{{$randomProduct}}A random product name
{{$randomProductAdjective}}A random product adjective
{{$randomProductMaterial}}A random product material
{{$randomProductName}}A random product name with adjective and material
{{$randomDepartment}}A random commerce category

Grammar

VariableDescription
{{$randomNoun}}A random noun
{{$randomVerb}}A random verb
{{$randomIngverb}}A random verb ending in -ing
{{$randomAdjective}}A random adjective
{{$randomWord}}A random word
{{$randomWords}}Some random words
{{$randomPhrase}}A random phrase

Lorem ipsum

VariableDescription
{{$randomLoremWord}}A random word of lorem ipsum text
{{$randomLoremWords}}Some random words of lorem ipsum text
{{$randomLoremSentence}}A random sentence of lorem ipsum text
{{$randomLoremSentences}}A random 2 to 6 sentences of lorem ipsum text
{{$randomLoremParagraph}}A random paragraph of lorem ipsum text
{{$randomLoremParagraphs}}Three random paragraphs of lorem ipsum text
{{$randomLoremText}}A random amount of lorem ipsum text
{{$randomLoremSlug}}A random lorem ipsum URL slug
{{$randomLoremLines}}1 to 5 random lines of lorem ipsum text

Notes

  • Values are generated when the request runs, not when you type the placeholder.
  • Unknown {{$name}} tokens that are not in this list are left unchanged in the outgoing request.
  • Image URL variables return placeholder image URLs suitable for mock requests.