HTTP Reference
The definitive reference for every HTTP status code, with examples, best practices, and instant search.
38 of 38 codes
1xx Informational
The server received the request and is continuing the process.
2xx Success
The request was received, understood, and accepted.
3xx Redirection
Further action is needed to complete the request.
4xx Client Error
The request contains bad syntax or cannot be fulfilled.
5xx Server Error
The server failed to fulfil a valid request.
HTTP Reference FAQ
- What do the HTTP status code classes mean?
- 1xx are informational, 2xx mean success, 3xx are redirects, 4xx are client errors (the request was wrong) and 5xx are server errors (the request was fine but the server failed).
- What is the difference between 401 and 403?
- 401 Unauthorized means the client is not authenticated and should send credentials. 403 Forbidden means the server knows who the client is but refuses access; retrying with the same credentials will not help.
- Should I use 301 or 308 for a permanent redirect?
- Both are permanent. 301 lets clients change POST to GET when following the redirect, while 308 guarantees the method and body are preserved, so prefer 308 for API endpoints.
- When should an API return 422 instead of 400?
- Use 400 when the request is malformed, such as invalid JSON. Use 422 when the syntax is valid but the content fails validation, such as a missing required field or an out-of-range value.
- How do I search for a code?
- Type a full or partial code: "40" lists 400 to 409 and "5xx" lists every server error. Any other text searches names, descriptions and best practices. Press "/" to focus the search box.