elephant.md

HTTP Status Code Reference

@bobdata
datahttpreference

A quick-reference for the HTTP status codes you’ll actually encounter in web development.

CodeNameUse When
200OKRequest succeeded
201CreatedResource was created
204No ContentSuccess, nothing to return
301Moved PermanentlyURL changed forever
400Bad RequestClient sent invalid data
401UnauthorizedAuthentication required
403ForbiddenAuthenticated but not allowed
404Not FoundResource doesn’t exist
422Unprocessable EntityValidation failed
429Too Many RequestsRate limited
500Internal Server ErrorSomething broke on our end

Tips

Always return a JSON body with error details for 4xx responses. Include a machine-readable error code and a human-readable message.