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
| Code | Meaning | When |
|---|---|---|
| 200 OK | Success with body | GET, PUT returning the resource |
| 201 Created | Resource created | POST; include Location |
| 202 Accepted | Queued for async processing | Long-running jobs |
| 204 No Content | Success, no body | DELETE, PUT |
| 301/308 | Moved permanently | URL changes |
| 304 Not Modified | Cached copy still valid | ETag / If-None-Match |
| 400 Bad Request | Invalid input | Validation errors |
| 401 Unauthorized | Not authenticated | Missing/invalid token |
| 403 Forbidden | Authenticated but not allowed | Role/policy fails |
| 404 Not Found | Resource doesn't exist | |
| 405 Method Not Allowed | Wrong verb | |
| 409 Conflict | State conflict | Duplicate, concurrency |
| 412 Precondition Failed | If-Match ETag mismatch | Optimistic concurrency |
| 415 Unsupported Media Type | Wrong Content-Type | |
| 422 Unprocessable Content | Semantically invalid | Business rule violations (some APIs) |
| 429 Too Many Requests | Rate limited | + Retry-After |
| 500 Internal Server Error | Unhandled server error | |
| 502/503/504 | Gateway / unavailable / timeout | Downstream failures |