Tool Lockers
Everyday online tools

Tool Lockers guide

HTTP Status Codes Cheat Sheet: Common 2xx–5xx Codes

A concise guide to common HTTP response codes, what they signal, and how to troubleshoot API responses.

By Tool Lockers

Read the status class first

An HTTP status code is a three-digit response code. The first digit gives a quick category:

  • 2xx: the request succeeded.
  • 3xx: the client may need to follow a redirect or use a cached response.
  • 4xx: the request or caller cannot be fulfilled as sent.
  • 5xx: the server or an upstream dependency failed while handling a valid-looking request.

The exact behavior still depends on the method, response headers, API contract, and application.

Common codes

CodeShort meaningTypical check
200OKInspect the response body and confirm it matches the API contract.
201CreatedCheck the created resource location or returned identifier.
204No ContentA successful response has no body; do not try to parse JSON blindly.
301 / 308Permanent redirectCheck the Location target and whether the method should be preserved.
302 / 307Temporary redirectCheck the target; 307 preserves the request method.
304Not ModifiedA conditional request can reuse a cached representation.
400Bad RequestValidate syntax, query parameters, and required fields.
401UnauthorizedCheck authentication credentials and token expiry.
403ForbiddenAuthentication may be present, but permission is insufficient.
404Not FoundCheck the path, resource identifier, and deployment environment.
409ConflictResolve a state conflict, duplicate, or version mismatch.
422Unprocessable ContentThe syntax may be valid while the submitted values violate validation rules.
429Too Many RequestsRespect any Retry-After header and apply backoff.
500Internal Server ErrorCheck server logs and correlation IDs; avoid exposing internal details.
502 / 503 / 504Gateway or service unavailableCheck upstream health, timeouts, and retry policy.

These are common interpretations, not a guarantee of how every service uses a code. Read the API documentation and response body.

Debug an API response

Start with the exact request URL, method, and authentication context. Then inspect the status, response headers, and body. A 401 and 403 usually point to different problems: one concerns valid authentication, while the other concerns authorization or policy. A 429 should not be retried in a tight loop; use a bounded backoff and follow server guidance.

For a 5xx response, capture a request ID if provided and check server-side logs. Repeating a non-idempotent request can create duplicate work, so understand the operation and retry rules before sending it again.

Look up a code with the HTTP Status Lookup, or send a test request and inspect the result with the API Tester. A status code alone rarely explains the complete failure; combine it with headers, the response body, and service logs.