- Instant help with your Developer coding problems

Generate dynamic GUID for each request in Postman

Question:
How to generate dynamic GUID for each request in Postman?
Answer:
{
    "guid": "{{$guid}}",
}

-- OR --

{
    "guid": "{{$randomUUID}}",
}
Description:

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:

Postman request with fix GUID

Then you can modify it so that for each request, Postman sends a freshly generated unique ID to the endpoint.

Postman request with dynamic GUID

You can use either the variable $guid which generates a uuid-v4 style GUID or $randomUUID which generates a random 36-character UUID .

Share "How to generate dynamic GUID for each request in Postman?"
Tags:
generate, create, random, dynamic, guid, uuid, request, postman
Technical term:
Generate dynamic GUID for each request in Postman