Postman - How to pass a global variable into JSON body

Dan Paschevici picture Dan Paschevici · Mar 30, 2016 · Viewed 42.9k times · Source

I'm working with Postman right now and I have to do a lot of requests, and in the body I'm passing a JSON content. I would like to know if is there a way to pass the value of a global variable into JSON body. Thank you.

Answer

RadamHussein picture RadamHussein · Jul 11, 2017

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.