Common HTTP Status Codes for RESTful Services

  • Post published:May 9, 2020

This article will cover common Success, Client Error and Server Error status codes used for RESTful services. The below tables provide the different types of HTTP status codes with a description.

2xx Success

These status codes indicate that the client’s request was successfully received, understood and accepted.

CodeDescription
200OK
201Created
202Accepted
204No Content

4xx Client Error

These status codes indicate that the client provided an error in the request.

CodeDescription
400Bad Request
401Unauthorized
403Forbidden
404Not Found
405Method Not Allowed
409Conflict
410Gone

5xx Server Error

These status codes indicate that the server is aware it has made an error or is incapable of performing the request.

CodeDescription
500Internal Server Error
501Not Implemented
502Bad Gateway
503Service Unavailable
504Gateway Timeout

Summary

Using HTTP status codes correctly in a RESTful service is useful and provides consistency across all API implementations.

Further information on HTTP status codes can be found at the following link: