<variable_name> and they work anywhere in the request file — URLs, headers, and body fields.
Syntax
Wrap the variable name in angle brackets:environments.cenv or secrets.cenv files.
If a variable is used in a request but not defined in the active environment, Postchi shows an error and does not run the request.
Where variables work
| Location | Example |
|---|---|
| URL segment | https://api.example.com/users/<user_id> |
| Query parameter | https://api.example.com/search?q=<search_term> |
| Header value | Authorization: <api_token> |
| JSON body value | "email": "<email>" |
| Form body value | username=<username> |
Example
If your active environment contains:Variables in JSON bodies
In a JSON body, Postchi expects variables to appear as quoted string values. Wrap the placeholder in double quotes:"<username>" with the resolved value wrapped in quotes, keeping the JSON valid.