HTTP status code for update and delete?

For a PUT request: HTTP 200, HTTP 204 should imply “resource updated successfully”. HTTP 201 if the PUT request created a new resource. For a DELETE request: HTTP 200 or HTTP 204 should imply “resource deleted successfully”. HTTP 202 can also be returned by either operation and would imply that the instruction was accepted by … Read more

403 Forbidden vs 401 Unauthorized HTTP responses

A clear explanation from Daniel Irvine [original link]: There’s a problem with 401 Unauthorized, the HTTP status code for authentication errors. And that’s just it: it’s for authentication, not authorization. Receiving a 401 response is the server telling you, “you aren’t authenticated–either not authenticated at all or authenticated incorrectly–but please reauthenticate and try again.” To … Read more