HTTP Status Codes
A quick reference for HTTP status codes you may encounter when working with websites, APIs, and web services.
| Code |
Name |
Meaning |
| 100 |
Continue |
Server received the request headers; client should proceed |
| 101 |
Switching Protocols |
Server is switching protocols as requested |
| 102 |
Processing |
Server is processing the request (WebDAV) |
2xx - Success
| Code |
Name |
Meaning |
| 200 |
OK |
Request succeeded |
| 201 |
Created |
Resource was created successfully |
| 202 |
Accepted |
Request accepted but not yet processed |
| 204 |
No Content |
Request succeeded, no content to return |
| 206 |
Partial Content |
Partial resource returned (range requests) |
3xx - Redirection
| Code |
Name |
Meaning |
| 301 |
Moved Permanently |
Resource has permanently moved to a new URL |
| 302 |
Found |
Resource temporarily at a different URL |
| 303 |
See Other |
Response is at another URI (use GET) |
| 304 |
Not Modified |
Cached version is still valid |
| 307 |
Temporary Redirect |
Temporary redirect, same method |
| 308 |
Permanent Redirect |
Permanent redirect, same method |
4xx - Client Errors
| Code |
Name |
Meaning |
| 400 |
Bad Request |
Server cannot process the request due to client error |
| 401 |
Unauthorized |
Authentication required |
| 403 |
Forbidden |
Server understood but refuses to authorise |
| 404 |
Not Found |
Resource does not exist |
| 405 |
Method Not Allowed |
HTTP method not supported for this resource |
| 408 |
Request Timeout |
Server timed out waiting for the request |
| 409 |
Conflict |
Request conflicts with current state |
| 410 |
Gone |
Resource permanently removed |
| 413 |
Payload Too Large |
Request body exceeds server limits |
| 415 |
Unsupported Media Type |
Media format not supported |
| 422 |
Unprocessable Entity |
Request well-formed but semantically invalid |
| 429 |
Too Many Requests |
Rate limit exceeded |
| 451 |
Unavailable For Legal Reasons |
Blocked for legal reasons |
5xx - Server Errors
| Code |
Name |
Meaning |
| 500 |
Internal Server Error |
Generic server error |
| 501 |
Not Implemented |
Server does not support the functionality |
| 502 |
Bad Gateway |
Server received invalid response from upstream |
| 503 |
Service Unavailable |
Server temporarily overloaded or under maintenance |
| 504 |
Gateway Timeout |
Upstream server did not respond in time |
| 507 |
Insufficient Storage |
Server cannot store the representation |
| 508 |
Loop Detected |
Infinite loop detected |
Common Scenarios
"I see a 403 error"
The server understood your request but won't allow it. Common causes:
- Missing or invalid authentication
- IP address blocked
- Directory listing disabled
- File permissions incorrect
"I see a 500 error"
Something went wrong on the server. Common causes:
- Application bug or crash
- Misconfigured server
- Database connection failure
- Out of memory
"I see a 502 or 504 error"
The server acting as a gateway had trouble reaching an upstream server. Common causes:
- Backend server is down
- Backend server is overloaded
- Network issues between servers
- Timeout waiting for response
API-Specific Codes
When working with REST APIs, you'll commonly see:
| Code |
Typical Use |
| 200 |
Successful GET, PUT, PATCH |
| 201 |
Successful POST (resource created) |
| 204 |
Successful DELETE (no content returned) |
| 400 |
Validation failed, malformed JSON |
| 401 |
Missing or invalid API key |
| 403 |
Valid credentials but insufficient permissions |
| 404 |
Endpoint or resource doesn't exist |
| 422 |
Valid JSON but business logic failed |
| 429 |
Rate limit hit |
| 500 |
Server-side bug |