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

CodeNameMeaning
200OKThe request worked and the body holds the result
201CreatedA new resource now exists, common after POST
202AcceptedThe server will process the work later
204No ContentThe action worked and nothing needs returning, common after DELETE

Redirect Codes

CodeNameMeaning
301Moved PermanentlyThe resource has a new permanent address
302FoundThe resource sits at another address for now
304Not ModifiedYour saved copy is still current

Client Error Codes

CodeNameTypical Cause
400Bad RequestBroken JSON or a missing required field
401UnauthorizedMissing or invalid login credentials
403ForbiddenValid login without permission for this action
404Not FoundWrong URL or an ID that does not exist
405Method Not AllowedUsing POST where only GET works
409ConflictThe data clashes with existing data, such as a duplicate email
422Unprocessable EntityThe format is valid but the values fail business rules
429Too Many RequestsYou exceeded the rate limit

Server Error Codes

CodeNameTypical Cause
500Internal Server ErrorAn unexpected bug on the server
502Bad GatewayA middle server received a broken reply
503Service UnavailableThe server is down or overloaded
504Gateway TimeoutAn 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 owner

Practice 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.