What are status codes in Web API?

Updated Apr 28, 2026

Short answer

Status codes indicate result of HTTP request.

Deep explanation

Common codes include 200 (OK), 201 (Created), 400 (Bad Request), 404 (Not Found), 500 (Server Error).

Real-world example

Returning 404 when resource not found.

Common mistakes

  • Using incorrect status codes.

Follow-up questions

  • What is 201?
  • Why status codes?

More ASP.NET Web API interview questions

View all →