Variables let you store tokens, identifiers and other values from responses and then use them later in other requests. They form the backbone that connects various tools in Proxygen together.

Environments

Open Variables window with keyboard shortcut shift-command-v.

On the left you have a list of Environments, each with its own variables. One of them is the Active Environment. When substituting values the variable name is searched first from the active and then from the Default environment.

You can set up the same variable name in several environments, with different values. For example, configure a variable named apiKey in both Development and Staging environments. Then change the active environment to use a different API key for all requests.

Placeholders

Variables can be inserted to requests in Test and Editor tools using {{name}} syntax with the variable name. Type {{ to see completions of variables from active environment and available built-ins.

All placeholders are substituted with current variable values before the request is sent.

Built-ins

The following Built-in variables area available:

  • uuid inserts a random UUID value
  • timestamp inserts the current UNIX timestamp e.g. 1775143329
  • timestampMs inserts the current UNIX timestamp in milliseconds
  • date('yyyy-MM-dd') inserts current time in given format e.g. 2026-04-02

For example, type {{uuid}} or {{timestamp}} in your request.

Operations

Variables and built-ins can be transformed using dot syntax with the following Operations:

  • base64Encode – Base64 encode
  • base64Decode – Base64 decode
  • base64UrlEncode — Base64URL encode
  • base64UrlDecode — Base64URL decode
  • hexEncode – Hex encode
  • hexDecode – Hex decode
  • urlEncode – URL encode
  • urlDecode – URL decode
  • jsonEscape – JSON escape
  • jsonUnescape – JSON unescape
  • jsonPrettyPrint — Pretty print JSON
  • htmlEscape – HTML escape
  • htmlUnescape – HTML unescape
  • unicodeEscape – Escape non-ASCII as \uXXXX
  • unicodeUnescape – Unescape non-ASCII from \uXXXX
  • asciiHexEncode — Hex encode
  • asciiHexDecode — Hex decode
  • sha1 – SHA-1 hash
  • sha256 – SHA-256 hash
  • sha512 – SHA-512 hash
  • md5 – MD5 hash
  • uppercase – Uppercase
  • lowercase – Lowercase
  • trim – Trim whitespace
  • reverse — Reverse a string
  • first — First element of array
  • last — Last element of array
  • count and length — Length of array or string

Some operations accept parameters:

  • split('separator') — Split string into array
  • nth(index) — Element at index (0-based)
  • replace('match','replacement') — Literal string replacement
  • regexReplace('pattern','replacement') — Regex replacement
  • substring(start,end) — Extract portion of string
  • addPrefix('text') — Prepend string
  • addSuffix('text') — Append string
  • jsonPath('query') — JSONPath query
  • xpath('query') — XPath query
  • hmacSha256('key') and hmacSha512('key') — HMAC signing

Here are some examples of chaining operations:

// Base64-encode a token and add the Bearer prefix
Authorization: {{apiToken.base64Encode.addPrefix('Bearer ')}}

// URL-encode a JSON-escaped value
body={{payload.jsonEscape.urlEncode}}

// get the second path segment from a URL stored in a variable
{{apiPath.split('/').nth(1).uppercase}}

// add a prefix to a base64-encoded value
{{secret.base64Encode.addPrefix('Basic ')}}

// extract a field from a JSON variable using jsonPath, then trim whitespace
{{response.jsonPath('$.data.name').trim}}

Scripting

Variables are also available to scripting. You can use the following functions to read from and write to variables:

// get variable value by name
getVariable(name)

// set variable value by name
setVariable(name, value)