Postman: a practical guide to testing APIs without writing a client
5 min readDeveloper Tools · Tools · Guides
The first time a backend endpoint exists, the frontend usually does not. You still need to know whether it works. You could write a throwaway script, or stitch together a long curl command, or you could open Postman, paste a URL and press Send. For most people that third option wins because the response comes back formatted, the request is saved, and nothing needs installing in the project.
Postman has grown from a simple request sender into a larger API platform with collaboration, mocking, monitoring and documentation. I only use a small part of it, and that small part is what this post covers: sending requests, organising them, using variables, writing basic tests, and being honest about where it costs you something.
What it does at the most basic level
You choose a method, enter a URL, add headers and a body, and send. The response shows the status code, time, size, headers and body. That is everything an HTTP client does, but Postman makes each part easy to read and easy to edit. JSON is pretty-printed, you can search inside it, and you can see the exact request that was sent, including headers the app added for you.
This matters because a lot of API debugging is really just reading. A 401 tells you authentication failed, a 422 tells you the server understood the request but rejected the data, and a 500 means the server itself broke. Seeing the response body next to the status usually tells you which one you are dealing with within seconds.
Collections: the part that makes it useful
A single request is a toy. A collection is a folder of saved requests that you can organise, share and run. I keep one collection per project with folders such as Auth, Users and Orders. Each request has a clear name, and I write a short note in the description for anything that is not obvious, such as which fields are required.
The reason to bother is repeatability. Three months from now, you will not remember the exact header an endpoint wanted. If the request is saved with the right header, the example body and a note, you do not have to rebuild it from the source code. A collection also works as living documentation for a teammate who joins later.
Environments and variables
The mistake beginners make is hard-coding values. A URL like http://localhost:3000/api/users works until you want to test staging. The fix is variables. You define an environment such as Local, Staging or Production, and give it values like baseUrl and token. Requests then refer to them with double curly braces.
GET {{baseUrl}}/api/users/{{userId}}
Authorization: Bearer {{token}}Switch the environment from the dropdown and every request now points somewhere else. This also keeps secrets out of the request definitions. One warning: variables marked as secret are masked in the interface, but if you sync a collection or export it, check what actually leaves your machine. Never keep a production token in a shared environment that other people can read.
Writing small tests
Postman can run JavaScript after a response arrives. This is where it stops being just a viewer and becomes a light test tool. A test can check the status code, the shape of the JSON or the response time, and it shows a pass or fail next to the request.
pm.test("returns 200", () => {
pm.response.to.have.status(200);
});
pm.test("has an id", () => {
const body = pm.response.json();
pm.expect(body).to.have.property("id");
});
// save a value for the next request
pm.environment.set("userId", pm.response.json().id);The last line is the one that unlocks real workflows. A login request can save the token into the environment, and every later request uses it automatically. A create request can save the new record's ID so the next request reads or deletes exactly that record. Chain them in order and you have a small end-to-end check for your API.
Running a whole collection
The collection runner executes every request in order and reports the test results. This is useful for a quick smoke test before a release: does login work, can I create a record, does the list endpoint return it, does delete clean it up. There is also a command-line runner, Newman, so the same collection can run in a CI job.
I would not treat Postman tests as a replacement for proper automated tests in your codebase. They are good for black-box checks of a deployed API and for early exploration. For logic that matters, keep tests next to the code, where they run on every commit.
The account and cloud question
This is the part I want you to think about before you adopt it. Postman has moved toward an account-based, cloud-synced model. Depending on your plan and settings, your collections, environments and request history may be stored on Postman's servers. That is convenient for teams. It is also a data decision: requests often contain tokens, internal URLs and sample customer data.
- Check which workspace type you are using and whether it is local or synced.
- Do not put real production credentials or personal data into saved examples.
- Read the current plan limits on the Postman site; features and caps have changed more than once, so I will not quote them here.
- If your company has rules about where API definitions can be stored, ask before you sync.
- Export your collections occasionally so you are not locked into one service.
Alternatives worth knowing
If the cloud model bothers you, there are lighter options. Bruno stores collections as plain files in a folder, which means you can commit them to Git beside your code. Insomnia is another desktop client with a similar feel. For quick checks, curl and httpie are still hard to beat, and many editors have an HTTP client built in that reads requests from a .http file.
Which one is best depends on how you work. For solo work and code-adjacent API definitions, I like files in Git. For a team that already uses Postman and wants shared documentation and monitors, staying put is reasonable. The tool matters less than having saved, repeatable requests at all.
Where it bites
- It gets heavy - the app is large and can feel slow compared with a terminal command.
- Sync surprises - collections can end up shared or stored in places you did not intend.
- Stale examples - saved requests drift out of date when the API changes, and nobody notices until they fail.
- Secrets in history - the request history keeps what you sent, including tokens.
- Plan changes - free-tier limits and features change, so check before building a team workflow on them.
The habits I keep
Name every request clearly. Use environments from day one. Save tokens through scripts instead of copying them by hand. Keep one smoke-test collection that you actually run before releases. And decide on purpose where your collections live, instead of discovering it later.
An API you can call in one click is an API you will actually test.
Tool: postman.com

Written by
Shihab Hossain — Full-Stack Developer
I build thoughtful digital products from Bangladesh — fast web experiences with Next.js, Android apps with Flutter, and the infrastructure behind them.
Work with me