HTTP 201 Created indicates that the request was fulfilled and a new resource was created as a result. The Location header typically contains the URI of the newly created resource. This is the expected response for successful POST requests that create new entities.
An API endpoint received a valid POST request and created a new record, returning its location.
A file was successfully uploaded and stored on the server.
The response should include a Location header pointing to the newly created resource.
curl -v -X POST -d '{"name":"test"}' -H 'Content-Type: application/json' https://api.example.com/itemsSend a GET request to the Location URI to confirm the resource was created correctly.
If repeated POST requests create duplicate resources, the API may need idempotency keys.