DELAPARRA
Index
Color
NL
Category: HTTP status codes

201 Created

Explained by Updated

What is 201 Created?

201 Created: A new resource was successfully created. 201 Created means the request succeeded and a new resource was made, such as a new customer, order or comment. It is the standard response to a successful POST that creates something. A good 201 response includes a Location header with the URL of the new resource, and usually the resource itself in the body, including its new ID. The client can then link to it or show it straight away, without another request.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about 201 Created

What should you keep in mind with 201 Created?

Using 201 instead of a generic 200 makes an API clearer to work with. Front-end code and integration tests can check for it explicitly, and anyone reading logs can see at a glance which requests created data. Laravel, for example, returns 201 automatically when you return a newly created model from a controller.

At a glance

CategoryHTTP status codes
Explained by
Updated

More HTTP status codes terms

All terms starting with a number or symbol

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.