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