Roadmap › ASP.NET Core Web API & REST › Module: REST Fundamentals
Lessons in this course (15)

2. HTTP status codes you must know

Basic★ Must knowLesson 2 of 15
CodeMeaningWhen
200 OKSuccess with bodyGET, PUT returning the resource
201 CreatedResource createdPOST; include Location
202 AcceptedQueued for async processingLong-running jobs
204 No ContentSuccess, no bodyDELETE, PUT
301/308Moved permanentlyURL changes
304 Not ModifiedCached copy still validETag / If-None-Match
400 Bad RequestInvalid inputValidation errors
401 UnauthorizedNot authenticatedMissing/invalid token
403 ForbiddenAuthenticated but not allowedRole/policy fails
404 Not FoundResource doesn't exist
405 Method Not AllowedWrong verb
409 ConflictState conflictDuplicate, concurrency
412 Precondition FailedIf-Match ETag mismatchOptimistic concurrency
415 Unsupported Media TypeWrong Content-Type
422 Unprocessable ContentSemantically invalidBusiness rule violations (some APIs)
429 Too Many RequestsRate limited+ Retry-After
500 Internal Server ErrorUnhandled server error
502/503/504Gateway / unavailable / timeoutDownstream failures