You've been typing URLs like /posts/1 and /users?role=admin. Now let's understand how Postman helps you manage these parameters properly — using its built-in UI instead of editing URLs manually.
Path variables are the dynamic parts of a URL. Instead of hardcoding /posts/1, you write /posts/:id and Postman gives you a nice field to fill in the value.
In the URL bar, type: https://jsonplaceholder.typicode.com/posts/:id
Notice the "Path Variables" section appears below the URL
In the "id" field, type: 1
Postman resolves it to https://jsonplaceholder.typicode.com/posts/1
Click Send — it works exactly like typing the full URL
// URL with path variable:
https://jsonplaceholder.typicode.com/posts/:id
// Postman auto-shows this in the Path Variables section:
Key: id Value: 1
// Resolved URL (what actually gets sent):
https://jsonplaceholder.typicode.com/posts/1
// You can use multiple path variables:
https://api.example.com/users/:userId/orders/:orderId
Key: userId Value: 42
Key: orderId Value: 789The colon prefix (:id) is Postman's syntax for path variables. It's NOT part of the actual URL. Postman replaces :id with the value you enter. This makes it easy to change the ID without editing the URL every time.
Query params are the key-value pairs after the ? in a URL. You can type them directly in the URL bar, but Postman has a better way — the Params tab.
Enter the base URL: https://jsonplaceholder.typicode.com/posts
Click the "Params" tab below the URL bar
Add key: userId, value: 1
Add key: _limit, value: 5
Watch the URL auto-update to: /posts?userId=1&_limit=5
Click Send
The Params tab is bidirectional. Type params in the URL and they appear in the table. Add rows in the table and they appear in the URL. Use whichever is more convenient.
Each param row in Postman has a checkbox. Uncheck it to disable that param without deleting it. This is incredibly useful for testing — you can quickly try requests with and without optional parameters.
Key Point: Use the checkbox to toggle params on/off instead of deleting and retyping them. Test with the param, uncheck it, test without it. This is how you find missing-parameter bugs.
Typing the full URL every time is tedious and error-prone. Variables fix this. You define a name once, use it everywhere.
// Without variables (hardcoded URL):
GET https://jsonplaceholder.typicode.com/posts/1
GET https://jsonplaceholder.typicode.com/users/3
GET https://jsonplaceholder.typicode.com/comments?postId=1
// With {{baseUrl}} variable:
GET {{baseUrl}}/posts/1
GET {{baseUrl}}/users/3
GET {{baseUrl}}/comments?postId=1
// baseUrl = https://jsonplaceholder.typicode.comClick your collection name in the sidebar
Go to the "Variables" tab
Add a variable: Name = baseUrl, Initial Value = https://jsonplaceholder.typicode.com
Click Save
In your requests, replace the full URL with {{baseUrl}}/posts/1
The variable resolves when you click Send
Now if you switch to a different API (like your company's staging server), just change the variable value in ONE place. All 50 requests update instantly.
Variables use double curly braces: {{baseUrl}}. Not single braces, not angle brackets. If your variable shows in orange text in the URL bar, it's recognized. If it shows in red, Postman can't find it — check spelling and scope.
Q: How do you handle dynamic URLs in Postman?
A: I use path variables for resource IDs — like /users/:userId — so I can easily change the ID without editing the URL. For base URLs, I create environment variables like {{baseUrl}} so switching between dev, staging, and production is one click. Query params I manage in the Params tab so I can toggle them on/off with checkboxes. This approach keeps requests clean and reusable across environments.
Key Point: Path variables identify WHICH resource. Query params filter HOW. Use {{baseUrl}} to avoid hardcoded URLs. Toggle params with checkboxes to test edge cases.