Basic HTTP Status Codes in API

facebooktwittergoogle_plusredditpinterestlinkedinmail

When you design a API, Http Status Codes are important. It helps the API consumer to know what happens or what to do.

Action Status Code
POST 201, 400, 500
GET 200, 404, 400, 500
DELETE 204, 404, 400, 500
PUT 200, 404, 400, 500
PATCH 200, 404, 400, 500
General actions 401, 403, 405
Status Code Description
200 Ok
201 Created
204 No content
400 Bad request
401 Unauthorized
403 Forbidden
404 Not found
405 Method not found
500 Internal server error
The following two tabs change content below.

Tom Mohan

Tom Mohan is a technologist who loves to code and build. He enjoys working on Microsoft Technologies. Tom specializes in ASP.NET MVC, Web API , Azure, C# ,WPF, SQL etc and holds a Bachelor engineering degree in Computer Science. Certification : MCSD , MCTS