HTTP 201 – Created
The request succeeded and a new resource was created as a result, usually after a POST or PUT.
Common use case
Returned by REST APIs after successfully creating a record, typically alongside a Location header pointing at the new resource's URL.
Example
HTTP/1.1 201 Created
Location: /users/482
{"id":482}History
Defined in the original HTTP/1.0 spec (RFC 1945, 1996).
Did you know?
Well-designed APIs pair 201 with a Location header so the client never has to guess the new resource's address.