Cheat Sheets
HTTP Status Codes
A quick reference to the HTTP status codes you will actually meet while building and debugging APIs — grouped by class, with the official name, a one-line meaning and where each one shows up in practice.
1xx · Informational
4 codesThe request was received and is being processed; the client can keep going.
Continue
Server received the request headers and the client should send the body.
Use case: Large uploads where the server confirms headers before the payload is sent.
Switching Protocols
Server is switching to a different protocol as requested via the Upgrade header.
Use case: WebSocket handshakes that upgrade HTTP to a persistent socket.
Processing
Server received the request and is still working; no final response yet.
Use case: Long-running WebDAV operations to keep the client from timing out.
Early Hints
Server sends preliminary headers before the final response so the client can start early.
Use case: Sending Link headers to preload critical assets before the body arrives.
2xx · Success
7 codesThe request was received, understood and accepted.
OK
The request succeeded; the body carries the requested data.
Use case: Standard success response for GET, PUT and most read operations.
Created
The request succeeded and a new resource was created.
Use case: POST responses that return the newly created resource and its Location.
Accepted
The request was accepted for processing but has not completed yet.
Use case: Asynchronous jobs and queues where work happens after the response.
Non-Authoritative Information
The response came from a proxy or cache and may differ from the origin.
Use case: Transformers or CDNs returning a modified copy of the original payload.
No Content
The request succeeded but there is no body to return.
Use case: DELETE and fire-and-forget updates where a body is unnecessary.
Reset Content
The request succeeded; the client should reset the form or view that sent it.
Use case: Form submissions that should clear their fields after success.
Partial Content
The server returns only part of the resource requested by a Range header.
Use case: Resumable downloads and streaming video or audio in chunks.
3xx · Redirection
6 codesThe client must take further action, usually by following a new location.
Multiple Choices
There are several possible responses and the client must pick one.
Use case: Content negotiation where multiple representations are available.
Moved Permanently
The resource has permanently moved to a new URL; update bookmarks and links.
Use case: SEO-friendly permanent redirects that pass link equity to the new URL.
Found
The resource temporarily lives at another URL; keep using the original next time.
Use case: Temporary redirects and legacy login flows that bounce between pages.
Not Modified
The cached copy is still valid, so no response body is sent.
Use case: Conditional GET requests with ETag or Last-Modified to save bandwidth.
Temporary Redirect
Temporarily redirect while preserving the request method and body.
Use case: Redirecting POST submissions without silently changing the HTTP verb.
Permanent Redirect
Permanently redirect while preserving the method and body.
Use case: Permanent redirects that must keep POST or PUT semantics intact.
4xx · Client Error
16 codesThe request is malformed, unauthorized or references a missing resource.
Bad Request
The server could not understand the request due to malformed syntax.
Use case: Invalid JSON bodies or missing required fields in a request.
Unauthorized
Authentication is required, or the provided credentials are missing or invalid.
Use case: Protected endpoints that require a valid token before access.
Payment Required
Reserved for future use; historically intended for digital payment.
Use case: Rarely used in practice; some paywalled APIs repurpose this status.
Forbidden
The server understood the request but refuses to authorize it.
Use case: Authenticated users trying to access a resource they lack permission for.
Not Found
The requested resource does not exist at this URL.
Use case: Unknown routes, mistyped URLs or records that have been deleted.
Method Not Allowed
The HTTP method is not supported for this resource.
Use case: Sending a GET to an endpoint that only accepts POST.
Not Acceptable
No available representation satisfies the client’s Accept headers.
Use case: Content negotiation failures when the client asks for an unsupported format.
Request Timeout
The server timed out waiting for the client to finish the request.
Use case: Slow or incomplete client uploads that exceed the server timeout.
Conflict
The request conflicts with the current state of the resource.
Use case: Duplicate records or optimistic-locking failures during concurrent writes.
Gone
The resource was intentionally removed and will not return.
Use case: Permanently deleted endpoints, distinct from a temporary 404.
Payload Too Large
The request body exceeds the size limit the server will accept.
Use case: Oversized file uploads rejected by a configured size cap.
URI Too Long
The request URL is longer than the server is willing to process.
Use case: Extremely long query strings that exceed server URL limits.
Unsupported Media Type
The media type of the request body is not supported.
Use case: Sending text/plain to a JSON API that expects application/json.
I'm a teapot
An April Fools’ RFC joke; the server refuses to brew coffee.
Use case: Easter eggs, API smoke tests and protocol trolling.
Unprocessable Entity
The request is well-formed but semantically invalid.
Use case: Validation errors on well-formatted input that fails business rules.
Too Many Requests
The client sent too many requests and is being rate limited.
Use case: Rate-limit and throttle responses that ask the client to back off.
5xx · Server Error
6 codesThe server failed to fulfill a request that otherwise appeared valid.
Internal Server Error
A generic error occurred on the server with no more specific message.
Use case: Unhandled exceptions or unexpected failures in application code.
Not Implemented
The server does not support the requested functionality.
Use case: Unsupported methods or features that the server has not built.
Bad Gateway
The server, acting as a gateway, got an invalid response upstream.
Use case: Reverse proxies or CDNs when the origin returns a broken response.
Service Unavailable
The server is temporarily overloaded or down for maintenance.
Use case: Maintenance windows, overload protection and rolling deployments.
Gateway Timeout
The upstream server did not respond within the allowed time.
Use case: Slow backends behind a proxy that exceed the timeout budget.
HTTP Version Not Supported
The server does not support the HTTP version used in the request.
Use case: Legacy or malformed requests using an unsupported protocol version.