Generate dynamic GUID for each request in Postman
{
"guid": "{{$guid}}",
}
-- OR --
{
"guid": "{{$randomUUID}}",
}
For API requests that use a unique identifier, such as GUID
, it may be useful to send each request with a new dynamically generated GUID
identifier. Fortunately, Postman offers a solution to this and you don't have to manually set up a new GUID
before sending each request.
All you need to do is insert a dynamic variable in your request instead of a hard-coded value. For example, if the original request looked like this:
Then you can modify it so that for each request, Postman sends a freshly generated unique ID to the endpoint.
You can use either the variable $guid
which generates a uuid-v4
style GUID
or $randomUUID
which generates a random 36-character UUID
.