9kit.org

HTTP Status Codes Reference

HTTP status codes are issued by a server in response to a client request. They indicate whether a request has been successfully completed, or if errors occurred. This comprehensive reference includes all standard status codes with explanations of when to use each one, RFC references, and practical examples.

100

Continue

The server has received the request headers and the client should proceed to send the request body.

Use when: Used during a large file upload to check if the server accepts the data before actually sending it.
RFC 9110
101

Switching Protocols

The requester has asked the server to switch protocols and the server has agreed to do so.

Use when: When upgrading to a different protocol like WebSocket or HTTP/2.
RFC 9110
102

Processing

The server is processing the request but no response is available yet.

Use when: For long-running requests to prevent timeout.
RFC 2518
103

Early Hints

Used to return some response headers before the final HTTP message.

Use when: To send Link headers for preloading resources before the final response.
RFC 8297
200

OK

The request has succeeded.

Use when: Standard success response for GET, PUT, PATCH, or DELETE requests.
RFC 9110
201

Created

The request has been fulfilled and has resulted in a new resource being created.

Use when: After successfully creating a new resource (POST/PUT).
RFC 9110
202

Accepted

The request has been accepted for processing, but the processing has not been completed.

Use when: For asynchronous operations that will be processed later.
RFC 9110
203

Non-Authoritative Information

The returned metadata is not exactly the same as available from the origin server.

Use when: When using a proxy that modifies the response.
RFC 9110
204

No Content

The server has fulfilled the request but does not need to return a response body.

Use when: For successful DELETE or PUT requests where no content is needed.
RFC 9110
205

Reset Content

The server has fulfilled the request and the client should reset the document view.

Use when: To clear a form after successful submission.
RFC 9110
206

Partial Content

The server is delivering only part of the resource due to a Range header.

Use when: For resumable downloads or serving video chunks.
RFC 9110
207

Multi-Status

Multiple status codes for different operations.

Use when: For batch operations with mixed results.
RFC 4918
208

Already Reported

The members of a DAV binding have already been enumerated.

Use when: For WebDAV directory traversals.
RFC 5842
300

Multiple Choices

The request has more than one possible response.

Use when: When multiple representations are available for a resource.
RFC 9110
301

Moved Permanently

The URL of the requested resource has been changed permanently.

Use when: When permanently redirecting old URLs to new ones for SEO.
RFC 9110
302

Found

The URI of requested resource has been changed temporarily.

Use when: For temporary redirects. Note: browsers may change POST to GET.
RFC 9110
303

See Other

The server sent this response to direct the client to get the requested resource at another URI.

Use when: After form submission, redirect to a thank you page.
RFC 9110
304

Not Modified

Indicates that the resource has not been modified since the last request.

Use when: For caching. Tell browser to use cached version.
RFC 9110
305

Use Proxy

The requested resource is available only through a proxy.

Use when: Deprecated. Indicates a required proxy.
RFC 9110
307

Temporary Redirect

The server sends this response to direct the client to get the requested resource at another URI with the same method.

Use when: Temporary redirect that preserves the HTTP method.
RFC 9110
308

Permanent Redirect

The resource is now permanently located at another URI.

Use when: Permanent redirect that preserves the HTTP method.
RFC 7538
400

Bad Request

The server cannot process the request due to malformed syntax.

Use when: When the request has invalid JSON, missing required fields, or invalid parameters.
RFC 9110
401

Unauthorized

The client must authenticate itself to get the requested response.

Use when: When authentication is required but missing or invalid.
RFC 9110
402

Payment Required

Reserved for future use.

Use when: Originally intended for digital payment systems. Rarely used.
RFC 9110
403

Forbidden

The client does not have access rights to the content.

Use when: When authenticated but not authorized to access the resource.
RFC 9110
404

Not Found

The server cannot find the requested resource.

Use when: When the resource does not exist or URL is incorrect.
RFC 9110
405

Method Not Allowed

The request method is known but not supported by the target resource.

Use when: When using wrong HTTP method for an endpoint (e.g., DELETE on read-only endpoint).
RFC 9110
406

Not Acceptable

The server cannot produce a response matching the Accept headers.

Use when: When content negotiation fails.
RFC 9110
407

Proxy Authentication Required

Similar to 401 but authentication is required by a proxy.

Use when: When behind an authenticated proxy.
RFC 9110
408

Request Timeout

The server would like to shut down this unused connection.

Use when: When the server timed out waiting for the request.
RFC 9110
409

Conflict

The request conflicts with the current state of the server.

Use when: When trying to create a duplicate resource or version conflict.
RFC 9110
410

Gone

The content has been permanently deleted from the server.

Use when: For permanently deleted resources that will not return.
RFC 9110
411

Length Required

The server refuses to accept the request without a defined Content-Length.

Use when: When the server requires Content-Length header.
RFC 9110
412

Precondition Failed

The client has indicated preconditions in its headers which the server does not meet.

Use when: For conditional requests with If-Match or If-Unmodified-Since.
RFC 9110
413

Payload Too Large

The request entity is larger than limits defined by the server.

Use when: When file upload exceeds server limits.
RFC 9110
414

URI Too Long

The URI requested by the client is longer than the server can interpret.

Use when: When query string is too long or cookie overflow.
RFC 9110
415

Unsupported Media Type

The media format of the requested data is not supported.

Use when: When sending JSON to an endpoint expecting XML.
RFC 9110
416

Range Not Satisfiable

The range specified by the Range header cannot be fulfilled.

Use when: For invalid byte range requests.
RFC 9110
417

Expectation Failed

The expectation given in the Expect header cannot be met.

Use when: When server cannot meet requirements indicated by Expect header.
RFC 9110
418
Special

I'm a teapot

The server refuses to brew coffee because it is, permanently, a teapot.

Use when: April Fools Easter egg from RFC 2324 (HTCPCP).
RFC 2324
421

Misdirected Request

The request was directed at a server that is not able to produce a response.

Use when: For HTTP/2 when server cannot respond on the connection.
RFC 9110
422

Unprocessable Entity

The request was well-formed but could not be processed due to semantic errors.

Use when: For validation errors on valid-looking data.
RFC 9110
423

Locked

The resource that is being accessed is locked.

Use when: For WebDAV resources that are locked.
RFC 4918
424

Failed Dependency

The request failed because it depended on another request that failed.

Use when: For atomic operations where one part fails.
RFC 4918
425

Too Early

The server is unwilling to risk processing a request that might be replayed.

Use when: For TLS 1.3 early data (0-RTT).
RFC 8470
426

Upgrade Required

The server refuses to perform the request using the current protocol.

Use when: To force upgrade to TLS 1.3 from older TLS.
RFC 9110
428

Precondition Required

The origin server requires the request to be conditional.

Use when: To prevent lost update problems.
RFC 6585
429

Too Many Requests

The user has sent too many requests in a given amount of time.

Use when: For rate limiting. Tell clients to slow down.
RFC 6585
431

Request Header Fields Too Large

The server is not willing to process the request because its header fields are too large.

Use when: When headers or specific header is too large.
RFC 6585
451
Special

Unavailable For Legal Reasons

The server cannot legally provide the resource.

Use when: For government censorship or GDPR blocks.
7725
500

Internal Server Error

The server has encountered a situation it does not know how to handle.

Use when: Generic server error when no other 5xx fits.
RFC 9110
501

Not Implemented

The request method is not supported by the server.

Use when: When server does not support the functionality.
RFC 9110
502

Bad Gateway

The server, while acting as a gateway, received an invalid response.

Use when: When upstream server returns invalid response.
RFC 9110
503

Service Unavailable

The server is not ready to handle the request.

Use when: For maintenance or overload. Try again later.
RFC 9110
504

Gateway Timeout

The server is acting as a gateway and cannot get a response.

Use when: When upstream server takes too long to respond.
RFC 9110
505

HTTP Version Not Supported

The HTTP version used in the request is not supported.

Use when: When client uses an unsupported HTTP version.
RFC 9110
506

Variant Also Negotiates

The server has an internal configuration error.

Use when: For content negotiation loops.
RFC 2295
507

Insufficient Storage

The server cannot store the representation needed.

Use when: For WebDAV storage quota exceeded.
RFC 4918
508

Loop Detected

The server detected an infinite loop in the request.

Use when: For WebDAV binding loops.
RFC 5842
510

Not Extended

Further extensions to the request are required.

Use when: For HTTP extension framework.
RFC 2774
511

Network Authentication Required

The client needs to authenticate to gain network access.

Use when: For captive portals (hotel WiFi, etc.).
RFC 6585

Showing 61 of 61 HTTP status codes

Frequently Asked Questions

Tags

http
status
codes
reference
rest
api