Skip to content

Template Helpers Reference

Complete reference of all available template helpers. Use in response bodies with {{helperName}} syntax.

HelperDescriptionExample InputExample Output
{{params.name}}Path parameter/users/{id} called as /users/4242
{{query.name}}Query parameter?page=2&limit=102
{{body.field}}Request body field{"name": "Alice"}Alice
{{body.nested.field}}Nested body field{"user": {"id": 1}}1
{{headers.name}}Request headerAuthorization: Bearer xyzBearer xyz
{{method}}HTTP method-GET
{{path}}Request path-/api/users/42
HelperDescriptionExample Output
{{uuid}}UUID v4a1b2c3d4-e5f6-7890-abcd-1234567890ab
{{objectId}}MongoDB-style ID507f1f77bcf86cd799439011
HelperDescriptionExample Output
{{name}}Full nameJohn Smith
{{firstName}}First nameJohn
{{lastName}}Last nameSmith
{{username}}Usernamejsmith42
{{email}}Email addressjohn.smith@example.com
{{phone}}Phone number(555) 123-4567
{{avatar}}Avatar URLhttps://...
HelperDescriptionExample Output
{{address}}Street address123 Main St
{{city}}CitySan Francisco
{{state}}State/ProvinceCalifornia
{{stateAbbr}}State abbreviationCA
{{zipCode}}ZIP/Postal code94102
{{country}}CountryUnited States
{{countryCode}}Country codeUS
{{latitude}}Latitude37.7749
{{longitude}}Longitude-122.4194
HelperDescriptionExample Output
{{company}}Company nameAcme Corporation
{{jobTitle}}Job titleSoftware Engineer
{{department}}DepartmentEngineering
HelperDescriptionExample Output
{{url}}URLhttps://example.com/page
{{domain}}Domain nameexample.com
{{ipv4}}IPv4 address192.168.1.1
{{ipv6}}IPv6 address2001:0db8:85a3:...
{{userAgent}}User agent stringMozilla/5.0...
{{color}}Hex color#3498db
HelperDescriptionExample Output
{{date}}ISO date2026-01-15
{{datetime}}ISO datetime2026-01-15T10:30:00Z
{{timestamp}}Unix timestamp1737043200
{{timestampMs}}Unix timestamp (ms)1737043200000
{{pastDate}}Past date2025-06-20
{{futureDate}}Future date2026-08-15
{{now}}Current ISO datetime2026-01-23T14:30:00Z
HelperSyntaxDescriptionExample Output
{{number}}{{number min max}}Random integer{{number 1 100}} -> 42
{{float}}{{float min max precision}}Random float{{float 0 1 2}} -> 0.73
{{boolean}}{{boolean}}Random booleantrue
{{price}}{{price min max}}Price format{{price 10 100}} -> 49.99
HelperDescriptionExample Output
{{lorem}}Lorem paragraphLorem ipsum dolor sit...
{{sentence}}Random sentenceThe quick brown fox...
{{word}}Random wordsynergy
{{words 5}}N random wordsalpha beta gamma delta epsilon
{{paragraph}}ParagraphMultiple sentences

Generate arrays:

[
{{#repeat 3}}
{"id": {{@index}}, "name": "{{name}}"}{{#unless @last}},{{/unless}}
{{/repeat}}
]

Output:

[
{"id": 0, "name": "Alice Johnson"},
{"id": 1, "name": "Bob Smith"},
{"id": 2, "name": "Carol Williams"}
]

Variables inside repeat:

  • {{@index}} - Current index (0-based)
  • {{@first}} - True if first iteration
  • {{@last}} - True if last iteration

Pick randomly from options:

{{oneOf "active" "pending" "inactive"}}
{{#if params.id}}
{"id": "{{params.id}}"}
{{else}}
{"error": "ID required"}
{{/if}}
{{#eq query.status "active"}}
Active users
{{/eq}}
{{#gt query.page 1}}
Has previous page
{{/gt}}

Available: eq, ne, gt, gte, lt, lte