Template Variables¶
Template variables let you generate dynamic, realistic data in your mock responses. Use double curly braces: {{variableName}}.
Basic Usage¶
In your response body:
Each request generates fresh random data.
Request Data¶
Access data from the incoming request:
| Variable | Description | Example |
|---|---|---|
{{params.id}} |
Path parameter | /users/{id} -> {{params.id}} |
{{query.page}} |
Query string | ?page=2 -> {{query.page}} |
{{body.name}} |
Request body field | JSON body access |
{{headers.authorization}} |
Request header | Header value |
Environment Variables¶
Access variables from the active environment:
| Variable | Description |
|---|---|
{{env.VAR_NAME}} |
Value of VAR_NAME from the active environment |
Environment variables are set in the Environments panel. Select an active environment to make its variables available in templates, proxy target URLs, and authentication fields. See Environments for full details on creating and managing environments.
If no environment is active or the variable is not defined, {{env.VAR_NAME}} resolves to an empty string.
Available Helpers¶
Identity¶
| Helper | Output |
|---|---|
{{uuid}} |
a1b2c3d4-e5f6-7890-... |
{{name}} |
John Smith |
{{firstName}} |
John |
{{lastName}} |
Smith |
{{username}} |
jsmith42 |
Contact¶
| Helper | Output |
|---|---|
{{email}} |
john.smith@example.com |
{{phone}} |
(555) 123-4567 |
Location¶
| Helper | Output |
|---|---|
{{address}} |
123 Main St |
{{city}} |
San Francisco |
{{state}} |
California |
{{zipCode}} |
94102 |
{{country}} |
United States |
Business¶
| Helper | Output |
|---|---|
{{company}} |
Acme Corp |
{{jobTitle}} |
Software Engineer |
Internet¶
| Helper | Output |
|---|---|
{{url}} |
https://example.com/page |
{{domain}} |
example.com |
{{ipv4}} |
192.168.1.1 |
Date & Time¶
| Helper | Output |
|---|---|
{{date}} |
2026-01-15 |
{{timestamp}} |
1737043200 |
{{pastDate}} |
Date in the past |
{{futureDate}} |
Date in the future |
Numbers¶
| Helper | Output |
|---|---|
{{number 1 100}} |
Random integer 1-100 |
{{float 0 1 2}} |
Random float with 2 decimals |
{{boolean}} |
true or false |
Text¶
| Helper | Output |
|---|---|
{{lorem}} |
Lorem ipsum paragraph |
{{sentence}} |
Random sentence |
{{word}} |
Random word |
Arrays with Repeat¶
Generate arrays of items:
Generates an array of 5 user objects.
Full Reference¶
See Template Helpers Reference for the complete list.