Postman - How to pass a global variable into JSON body Postman - How to pass a global variable into JSON body json json

Postman - How to pass a global variable into JSON body


If using a raw JSON body:

{    "test key":"{{global variable}}"}

On sending the request, the curly braces will be replaced with the value of the variable.


I think what you want to do is described here.

To use a variable you need to enclose the variable name with double curly braces – {{my_variable_name}}.


Double curly bracket is working in header parameter, url or inside JSON body. Inside tests you should use globals example: {"url": globals.url} or {"url": globals["url"]}