Postman Cheatsheet - API Debugging Tool Reference

All essential Postman commands organized by use case, with 35+ entries you can copy and run directly. Find the right command fast when you need it.

Dev Tools·35 commands·Last updated 2026-07-21
Back to Dev Tools

Request Building 7

GET {{base_url}}/api/users
GET request
POST {{base_url}}/api/users
POST request
PUT {{base_url}}/api/users/1
PUT request
DELETE {{base_url}}/api/users/1
DELETE request
Headers: Content-Type: application/json
Set a request header
Body → raw → JSON
JSON request body
Authorization: Bearer {{token}}
Bearer Token auth

Environment Variables 6

{{base_url}}
Reference an environment variable
pm.environment.set("token", "xxx")
Set an environment variable
pm.environment.get("token")
Get an environment variable
pm.environment.unset("token")
Unset an environment variable
pm.globals.set("key", "value")
Set a global variable
pm.variables.get("key")
Get a variable (env/global)

Test Scripts 6

pm.test("Status is 200", () => { pm.response.to.have.status(200) })
Status code test
pm.expect(pm.response.json().name).to.eql("Alice")
JSON field test
pm.response.to.be.json
Response is JSON
pm.response.to.have.header("Content-Type")
Response header test
pm.expect(pm.response.responseTime).to.be.below(500)
Response time test
const json = pm.response.json()
Parse response JSON

Pre-request Scripts 4

pm.request.headers.add({key: "X-Token", value: "xxx"})
Dynamically add a request header
pm.request.body.update("new body")
Modify the request body
const timestamp = Date.now(); pm.environment.set("ts", timestamp)
Generate a timestamp
pm.request.url.addQueryParams({page: 1})
Add a query parameter

Collections & Runner 7

Collection Runner
Run a collection in batch
New Runner
New runner
Set Data File (CSV/JSON)
Data-driven testing
Delay: 1000ms
Request interval
Iterations: 10
Iteration count
Export Collection
Export collection
Import from cURL / OpenAPI
Import from cURL / OpenAPI

Mock & Docs 5

Mock Server
Create a Mock server
Example Responses
Save example responses
Documentation
Generate API docs
Publish Documentation
Publish docs
Monitor
Monitor

Tips

  • Variables come in Environment (current) and Global; put secrets in Environment.
  • Collection Runner plus a CSV data file enables data-driven testing.
  • Mock Server suits parallel frontend dev when the backend isn't ready yet.

Official References

Commands are compiled from the official docs below. Click to verify the latest usage.

Maintained by LaoHand

Publicly updated on Jul 21, 2026, continuously proofread against official docs.

Contact Us

Wrong command or description? Send us corrections, business inquiries or product feedback by email.

Contact Us