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 Informational2xx Success3xx Redirection4xx Client Error5xx Server Error

1xx · Informational

4 codes

The request was received and is being processed; the client can keep going.

100

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.

101

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.

102

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.

103

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 codes

The request was received, understood and accepted.

200

OK

The request succeeded; the body carries the requested data.

Use case: Standard success response for GET, PUT and most read operations.

201

Created

The request succeeded and a new resource was created.

Use case: POST responses that return the newly created resource and its Location.

202

Accepted

The request was accepted for processing but has not completed yet.

Use case: Asynchronous jobs and queues where work happens after the response.

203

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.

204

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.

205

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.

206

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 codes

The client must take further action, usually by following a new location.

300

Multiple Choices

There are several possible responses and the client must pick one.

Use case: Content negotiation where multiple representations are available.

301

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.

302

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.

304

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.

307

Temporary Redirect

Temporarily redirect while preserving the request method and body.

Use case: Redirecting POST submissions without silently changing the HTTP verb.

308

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 codes

The request is malformed, unauthorized or references a missing resource.

400

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.

401

Unauthorized

Authentication is required, or the provided credentials are missing or invalid.

Use case: Protected endpoints that require a valid token before access.

402

Payment Required

Reserved for future use; historically intended for digital payment.

Use case: Rarely used in practice; some paywalled APIs repurpose this status.

403

Forbidden

The server understood the request but refuses to authorize it.

Use case: Authenticated users trying to access a resource they lack permission for.

404

Not Found

The requested resource does not exist at this URL.

Use case: Unknown routes, mistyped URLs or records that have been deleted.

405

Method Not Allowed

The HTTP method is not supported for this resource.

Use case: Sending a GET to an endpoint that only accepts POST.

406

Not Acceptable

No available representation satisfies the client’s Accept headers.

Use case: Content negotiation failures when the client asks for an unsupported format.

408

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.

409

Conflict

The request conflicts with the current state of the resource.

Use case: Duplicate records or optimistic-locking failures during concurrent writes.

410

Gone

The resource was intentionally removed and will not return.

Use case: Permanently deleted endpoints, distinct from a temporary 404.

413

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.

414

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.

415

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.

418

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.

422

Unprocessable Entity

The request is well-formed but semantically invalid.

Use case: Validation errors on well-formatted input that fails business rules.

429

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 codes

The server failed to fulfill a request that otherwise appeared valid.

500

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.

501

Not Implemented

The server does not support the requested functionality.

Use case: Unsupported methods or features that the server has not built.

502

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.

503

Service Unavailable

The server is temporarily overloaded or down for maintenance.

Use case: Maintenance windows, overload protection and rolling deployments.

504

Gateway Timeout

The upstream server did not respond within the allowed time.

Use case: Slow backends behind a proxy that exceed the timeout budget.

505

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.