2xx Success
Successful responses
The request was received, understood, and accepted. The specific code says what the server did with it.
2xx codes differ in what they promise. 200 returns a representation, 201 reports that something was created and where it lives, 202 accepts work without promising it will succeed, and 204 succeeds with nothing to send back. Collapsing all of them into 200 throws away information the client needs.
A 2xx status is about the protocol exchange, not about business outcomes. An API that returns 200 with an error object inside is legal but defeats caching, monitoring, and retry logic, all of which read the status line rather than the body.
Codes in this class
- 200 OK: The request succeeded. What the body contains depends on the method that was used.
- 201 Created: The request succeeded and created one or more new resources, identified by the Location header.
- 202 Accepted: The request was accepted for processing, but the work has not finished and may still fail.
- 203 Non-Authoritative Information: The request succeeded, but an intermediary modified the payload it received from the origin server.
- 204 No Content: The request succeeded and the server has deliberately sent no body.
- 205 Reset Content: The request succeeded and the client should reset the document view that sent it, typically clearing a form.
- 206 Partial Content: The server is returning only the byte ranges the client asked for in the Range header.
- 207 Multi-Status: WebDAV response carrying an XML body with a separate status for each resource affected by the request.
- 208 Already Reported: WebDAV binding extension code used inside a 207 body to avoid repeating members that were already listed.
- 218 This Is Fine: Non-standard code used by cPanel builds of Apache in place of a 4xx or 5xx so that the response body still reaches the client.
- 226 IM Used: The response is the result of applying one or more instance manipulations, such as a delta, to the current representation.