Postman Status Codes
Every API response begins with a three-digit number called the status code. The number tells you in one glance whether the request worked, failed because of your mistake, or failed because of a server problem. Reading status codes quickly is one of the most useful skills in API testing.
The Five Families
Status codes group into families by their first digit. Learn the families first and the individual codes become easy to remember.
1xx Information "Hold on, I am working on it"
2xx Success "Done, here is your result"
3xx Redirect "Look at a different address"
4xx Client Error "You made a mistake"
5xx Server Error "I made a mistake"Codes You Will Meet Every Day
Success Codes
| Code | Name | Meaning |
|---|---|---|
| 200 | OK | The request worked and the body holds the result |
| 201 | Created | A new resource now exists, common after POST |
| 202 | Accepted | The server will process the work later |
| 204 | No Content | The action worked and nothing needs returning, common after DELETE |
Redirect Codes
| Code | Name | Meaning |
|---|---|---|
| 301 | Moved Permanently | The resource has a new permanent address |
| 302 | Found | The resource sits at another address for now |
| 304 | Not Modified | Your saved copy is still current |
Client Error Codes
| Code | Name | Typical Cause |
|---|---|---|
| 400 | Bad Request | Broken JSON or a missing required field |
| 401 | Unauthorized | Missing or invalid login credentials |
| 403 | Forbidden | Valid login without permission for this action |
| 404 | Not Found | Wrong URL or an ID that does not exist |
| 405 | Method Not Allowed | Using POST where only GET works |
| 409 | Conflict | The data clashes with existing data, such as a duplicate email |
| 422 | Unprocessable Entity | The format is valid but the values fail business rules |
| 429 | Too Many Requests | You exceeded the rate limit |
Server Error Codes
| Code | Name | Typical Cause |
|---|---|---|
| 500 | Internal Server Error | An unexpected bug on the server |
| 502 | Bad Gateway | A middle server received a broken reply |
| 503 | Service Unavailable | The server is down or overloaded |
| 504 | Gateway Timeout | An upstream server answered too slowly |
Where Postman Shows the Status
The status code appears in the response panel, just above the body, next to the response time and size. Postman colors the code green for 2xx results and red for errors. Hover over the code to see a short plain-language explanation.
Diagnosis Flow
Use this decision path whenever a request fails.
Request fails
│
├── 4xx ? ──► Problem is on YOUR side
│ ├── 400 → check body and params
│ ├── 401 → check token or password
│ ├── 403 → check account permissions
│ └── 404 → check URL and ID
│
└── 5xx ? ──► Problem is on the SERVER side
├── Retry after a short wait
└── Report to the API ownerPractice in Postman
Send a GET request to https://jsonplaceholder.typicode.com/users/9999 and observe the 404 response with an empty object. Send a POST request to https://jsonplaceholder.typicode.com/posts with a JSON body and observe the 201 response.
Test Status Codes Automatically
Add a check in the Post-response script area:
pm.test("Resource was created", function () {
pm.response.to.have.status(201);
});
pm.test("Status is a success code", function () {
pm.expect(pm.response.code).to.be.within(200, 299);
});Key Points
- The first digit reveals the family: success, redirect, client error, or server error.
- 4xx codes point to a problem in your request.
- 5xx codes point to a problem on the server.
- 201 confirms creation and 204 confirms a silent success.
- Write tests that assert the exact code you expect, not only a general success.
