Skip to content

Variable Syntax

Variables use the {{variableName}} syntax and can appear anywhere in a request — URL, headers, or body.

Variables resolve in this priority (highest wins):

  1. Extracted flow variables (# @extract) — set during the current run
  2. .env.local overrides — written by # @persist
  3. Active .env file variables
  4. File-level variables (@key = value)

Defined before the first ### with @key = value:

@baseUrl = https://api.example.com
@contentType = application/json
@version = v2
GET {{baseUrl}}/{{version}}/users
Content-Type: {{contentType}}

File-level variables can themselves reference .env variables:

@baseUrl = {{BASE_URL}}
@timeout = {{TIMEOUT}}

In dev.env:

BASE_URL = https://dev-api.example.com
API_TOKEN = dev_abc123
TIMEOUT = 5000

Used in requests:

GET {{BASE_URL}}/users
Authorization: Bearer {{API_TOKEN}}

# @extract pulls values from a response and makes them available as variables in subsequent steps:

### Login
POST {{baseUrl}}/auth/login
Content-Type: application/json
{ "email": "user@example.com", "password": "..." }
# @extract token = $.access_token
# @extract userId = $.user.id
### Use token in next request
GET {{baseUrl}}/users/{{userId}}
Authorization: Bearer {{token}}

The editor shows suggestions for all in-scope variables when you type {{. Press Tab to accept. Sources shown in autocomplete:

  • File-level variables
  • Active .env file variables
  • Variables extracted in earlier steps (.flow files)
@baseUrl = https://api.example.com
@userId = 42
GET {{baseUrl}}/users/{{userId}}/posts?page=1
GET {{baseUrl}}/me
Authorization: Bearer {{API_TOKEN}}
X-Request-Id: {{requestId}}
Accept-Language: {{locale}}
POST {{baseUrl}}/users
Content-Type: application/json
{
"name": "{{userName}}",
"email": "{{userEmail}}",
"orgId": {{orgId}}
}

Note: number variables (like {{orgId}}) are injected without quotes so the JSON remains valid.