201 Created
The HTTP status meaning a new resource was created, normally with a Location header saying where it lives.
In more detail
A create owes the client both the status and the address of the new item. The Location header gives the address of the new resource, and the body usually holds its representation.
Example
In the APIs course: The course service answers POST /tasks with 201 and Location: /tasks/5.Related terms
- Location header — The response header that gives an address: where a newly created resource lives, where a job can be watched, or where a redirect points.
- HTTP status code — The three-digit number at the start of a response, such as 200 or 404, that says how the server handled the request.
Taught in
- HTTP Methods And Status Codes — Modern API Architecture: REST, GraphQL & gRPC
- Cookies And CORS — Modern API Architecture: REST, GraphQL & gRPC
- Idempotency Keys — Modern API Architecture: REST, GraphQL & gRPC