HTTP Status Codes Cheatsheet
Every HTTP status code you need to know for building and debugging REST APIs.
HTTP status codes are three-digit responses from the server indicating the result of a request. They are grouped into five classes: 1xx (informational), 2xx (success), 3xx (redirection), 4xx (client error), and 5xx (server error).
This cheatsheet covers the most common codes. Use 200 for successful reads, 201 for resource creation, 204 for deletions, 4xx for client mistakes, and 5xx for server failures.
2xx Success
200 OK201 Created202 Accepted204 No Content3xx Redirection
301 Moved Permanently302 Found304 Not Modified4xx Client Errors
400 Bad Request401 Unauthorized403 Forbidden404 Not Found405 Method Not Allowed409 Conflict410 Gone422 Unprocessable Content429 Too Many Requests5xx Server Errors
500 Internal Server Error502 Bad Gateway503 Service Unavailable504 Gateway TimeoutHTTP Status Codes Cheatsheet
Every HTTP status code you need to know for building and debugging REST APIs.
HTTP status codes are three-digit responses from the server indicating the result of a request. They are grouped into five classes: 1xx (informational), 2xx (success), 3xx (redirection), 4xx (client error), and 5xx (server error).
This cheatsheet covers the most common codes. Use 200 for successful reads, 201 for resource creation, 204 for deletions, 4xx for client mistakes, and 5xx for server failures.
2xx Success
200 OK — Standard success response. The request has succeeded.201 Created — A new resource was successfully created.202 Accepted — Request accepted but processing is not yet complete. Used for async operations.204 No Content — Request succeeded but there is no response body.3xx Redirection
301 Moved Permanently — Resource has been permanently moved to a new URL. Clients should update bookmarks.302 Found — Resource temporarily available at a different URL. Use the Location header for the redirect.304 Not Modified — Cached version is still valid. Used with conditional GET (If-None-Match, If-Modified-Since).4xx Client Errors
400 Bad Request — Server cannot process the request due to malformed syntax or invalid data.401 Unauthorized — Authentication is required and has failed or was not provided.403 Forbidden — Client is authenticated but does not have permission to access the resource.404 Not Found — The requested resource does not exist on the server.405 Method Not Allowed — The HTTP method is not supported for this endpoint.409 Conflict — Request conflicts with the current state of the resource.410 Gone — Resource is intentionally disabled and will not be available again. No forwarding address.422 Unprocessable Content — Request body is syntactically correct but semantically invalid (validation failed).429 Too Many Requests — Client has exceeded the rate limit. Check Retry-After header.5xx Server Errors
500 Internal Server Error — Generic server error. The server encountered an unexpected condition.502 Bad Gateway — Server acting as a gateway received an invalid response from an upstream server.503 Service Unavailable — Server is temporarily unable to handle the request (overloaded or under maintenance).504 Gateway Timeout — Upstream server failed to respond in time. Common with proxied databases or microservices.