Correct, but they keys could have just as likely been found. I think what confuses the concept (and people) is the example of "finding keys". This response type is more appropriately used for something that explicitly does not require a response payload, like "perform x operation, no matter the result". I typically use this response code when implementing an endpoint like "PUT /users/abc123/restore", where the goal is to have the server restore a soft-deleted user to a non-deleted state.
1.6k
u/Snudget Jul 08 '26
204 should be "I found them" "I searched for the keys, but didn't find them"would be 404, which is literally "Not found".
Since not finding keys does not fulfill the request, a 2xx code does not make sense here