The request succeeded and created a new resource, usually identified by the Location header.
201 Created tells the client a new resource now exists. The Location header should point to it (otherwise the target URI is the new resource), and the body typically describes it. REST APIs return 201 for successful POST, and PUT returns 201 when it creates rather than replaces.
| Header | Role |
|---|---|
Location | URL of the created resource. |
ETag | Validator of the new resource, for later If-Match updates. |
HTTP/1.1 201 Created
Location: /api/orders/8841
Content-Type: application/json
{"id": 8841, "status": "pending"}