Back to Blog
HTTPAPIsWeb

HTTP Status Codes: The Complete Developer Reference

April 8, 2026 · 7 min read

HTTP status codes are three-digit numbers that a server returns to tell the client what happened to their request. Understanding them is essential for building and debugging APIs. Here's every code you're likely to encounter, explained plainly.

1xx — Informational

CodeNameMeaning
100ContinueServer received the request headers; client should proceed to send the body.
101Switching ProtocolsServer is switching to the protocol requested (e.g. WebSockets).
102ProcessingServer has received the request but has not yet completed it (WebDAV).

2xx — Success

CodeNameMeaning
200OKRequest succeeded. Standard response for GET, POST, PUT.
201CreatedResource was created. Typically returned after a successful POST.
202AcceptedRequest accepted for processing but not yet complete (async operations).
204No ContentRequest succeeded but there's no response body. Common for DELETE.
206Partial ContentServer is delivering part of a resource (range requests, file downloads).

3xx — Redirection

CodeNameMeaning
301Moved PermanentlyResource has permanently moved to a new URL. Browsers and bots update their links.
302FoundTemporary redirect. The resource is currently at a different URL.
303See OtherResponse to the request can be found at another URI using GET (after POST).
304Not ModifiedResource hasn't changed since last request. Client should use its cached version.
307Temporary RedirectLike 302 but the method must not change (POST stays POST).
308Permanent RedirectLike 301 but the method must not change.

4xx — Client Errors

CodeNameMeaning
400Bad RequestRequest is malformed — missing fields, invalid JSON, wrong content type.
401UnauthorizedAuthentication required (despite the name). No valid credentials provided.
403ForbiddenAuthenticated but not permitted. You're logged in but don't have access.
404Not FoundResource doesn't exist at this URL.
405Method Not AllowedHTTP method is not supported for this endpoint (e.g. DELETE on a read-only resource).
408Request TimeoutServer timed out waiting for the client to send the full request.
409ConflictState conflict — e.g. creating a resource that already exists.
410GoneResource permanently deleted. Stronger than 404 — it existed but is gone for good.
413Payload Too LargeRequest body exceeds the server's size limit.
415Unsupported Media TypeContent-Type header is not supported (e.g. sending XML to a JSON-only endpoint).
422Unprocessable EntityRequest is syntactically valid but semantically wrong (validation errors).
429Too Many RequestsRate limit exceeded. Usually includes a Retry-After header.

5xx — Server Errors

CodeNameMeaning
500Internal Server ErrorGeneric server-side failure. Something crashed unexpectedly.
501Not ImplementedServer doesn't support the requested functionality.
502Bad GatewayServer acting as a gateway got an invalid response from an upstream server.
503Service UnavailableServer is down or overloaded. Often temporary. Check Retry-After header.
504Gateway TimeoutUpstream server didn't respond in time.
507Insufficient StorageServer has no space to store the representation (WebDAV).

The Most Common Mistakes

401 vs 403 — Use 401 when the user isn't logged in. Use 403 when they're logged in but not allowed. Mixing these up leaks information about which resources exist.

200 vs 201 — Return 201 after creating a resource, not 200. Include a Location header pointing to the new resource.

400 vs 422 — Use 400 for malformed requests (bad JSON, missing required fields). Use 422 for valid requests with semantic errors (email already taken, end date before start date).

Don't use 200 for errors — Wrapping errors in a 200 response body breaks every client, monitoring tool, and load balancer that reads status codes.