201

Created

The request has been fulfilled and has resulted in one or more new resources being created.

Common Use

Standard response for POST requests that create new resources. The response typically includes a Location header pointing to the new resource.

API Endpoint

https://codes.uncodigo.com/http/201

Example with curl

curl -i https://codes.uncodigo.com/http/201

Try It

GET /http/201
Click "Send Request" to see the response...

Example

Request

POST /users HTTP/1.1
Content-Type: application/json

{"name": "Jane Doe"}

Response

HTTP/1.1 201 Created
Location: /users/124
Content-Type: application/json

{"id": 124, "name": "Jane Doe"}

Related Headers

Location

URI of the newly created resource

Location: /users/124