Skip to main content

HTTP Status Codes

Ranges#

Range
1XXInfo
2XXSuccess
3XXRedirection
4XXClient Error
5XXServer Error

Commonly used#

Status CodeMeaning
200OK
400Bad Request
401Unauthorized
403Forbidden
404Not Found
429Too Many Requests
500Internal Sever Error

Others#

Status CodeMeaning
201Created
204No Content
304Not Modified
405Method Not Allowed
406Not Acceptable
409Conflict
502Bad Gateway (Invalid response from upstream service)
503Service Unavailable

Headers for status codes#

301 Permanent redirection#

The new URI to be used for this and future requests should be specified in the Location header.

302, 307 Temporary redirection#

The temporary redirect URI should be specified in the Location header.

405 Method Not Allowed#

Set the Allow header to indicate the allowed methods

201 Resource Created#

Set the Location header to contain a link to the newly created resource.

Note#

404 Not Found status code can be used to mask unauthorized or forbidden requests for security reasons.