Developer
Postman Guide
Install Postman, understand the main workflow, and learn common API testing patterns.
Install
Postman installation
| Platform | Recommended path | Notes |
|---|---|---|
| macOS | Download the Postman app from the official Postman site, then move it to Applications. | Apple Silicon and Intel builds are handled by the official installer flow. |
| Windows | Download and run the official Postman installer. | Install per user unless your team manages software centrally. |
| Linux | Download the official Linux package or use a supported package channel. | Some teams prefer Snap or manually unpacking the app archive. |
| Browser | Use Postman on the web with the Postman Agent when local network access is needed. | The desktop app is still useful for local APIs and full desktop workflows. |
Workflow
Basic usage
- Create a workspace for the project or team.
- Create a collection and add requests such as GET, POST, PUT, PATCH, and DELETE.
- Use environments for variables like {{baseUrl}}, {{token}}, and {{userId}}.
- Configure authorization, headers, query parameters, and request body.
- Send the request, inspect status code, headers, cookies, timing, and body.
- Add tests to validate response status, JSON fields, and schema expectations.
- Run the collection manually, with data files, or in CI using Postman CLI/Newman when needed.
Examples
Common Postman scripts
| Use case | Snippet | |
|---|---|---|
| Status code test | pm.test("Status is 200", () => pm.response.to.have.status(200)); | |
| JSON field test | pm.test("Has id", () => pm.expect(pm.response.json()).to.have.property("id")); | |
| Save token | pm.environment.set("token", pm.response.json().access_token); | |
| Use variable | pm.request.headers.add({ key: "Authorization", value: `Bearer ${pm.environment.get("token")}` }); | |
| Response time | pm.test("Fast response", () => pm.expect(pm.response.responseTime).to.be.below(1000)); |
FAQ
Questions people ask
What is Postman used for?
Postman is used to design, send, document, test, and automate API requests across REST, GraphQL, WebSocket, gRPC, and other API styles.
Do I need an account?
A Postman account is useful for sync and collaboration, while local and lightweight workflows can still be used depending on setup.
How should I manage environments?
Keep reusable values such as base URLs, tokens, and IDs in environments so requests stay portable between local, staging, and production.
Related tools