A new resource exists as a result of this request. A well-behaved API also sends a Location header pointing at it, and usually the created representation as the body.
Defined in RFC 9110 §15.3.2 — 201 Created · MDN reference
Sign-ups, orders, uploads, bookings, comments — anything where a POST leaves something behind that has an address of its own afterwards, and where the caller will very likely want to fetch or modify it a moment later.
Check the Location header, not just the status — clients that build the follow-up URL themselves break the first time the server changes its id scheme.
Read the Location header and follow it rather than assembling the URL yourself from the id in the body. Servers change id schemes; clients that guess break on the day they do. Where the body carries the created representation, use it instead of an immediate re-fetch.
44 endpoints in this playground answer with 201. Every one is free, needs no signup, and can be called from the browser or with curl.
POST https://funapi.dev/api/friends/v1/characters — Created (Friends API) Open & run this endpointPOST https://funapi.dev/api/friends/v1/characters/bulk — All items created (Friends API) Open & run this endpointPOST https://funapi.dev/api/superheroes/v1/heroes — Created (Superhero API) Open & run this endpointPOST https://funapi.dev/api/superheroes/v1/heroes/versus — Fight resolved, random winner (Superhero API) Open & run this endpointPOST https://funapi.dev/api/pizza/v1/orders — Order placed (Pizza Orders API) Open & run this endpointPOST https://funapi.dev/api/coffee/v1/orders — Order placed (Coffee Shop API) Open & run this endpointPOST https://funapi.dev/api/football/v1/matches — Match played, random score (Football API) Open & run this endpointPOST https://funapi.dev/api/movies/v1/movies — Created (Movies API) Open & run this endpointPOST https://funapi.dev/api/movies/v1/movies/{id}/poster — Uploaded (Movies API) Open & run this endpointPOST https://funapi.dev/api/wizarding/v1/students — Enrolled (Harry Potter API) Open & run this endpointPOST https://funapi.dev/api/galaxy/v1/characters — Created (Star Wars API) Open & run this endpointPOST https://funapi.dev/api/holmes/v1/suspects — Created (Sherlock Holmes API) Open & run this endpointPOST https://funapi.dev/api/pokemon/v1/pokemon — Created (Pokémon API) Open & run this endpointPOST https://funapi.dev/api/pokemon/v1/battles — Battle resolved, random winner (Pokémon API) Open & run this endpointPOST https://funapi.dev/api/middleearth/v1/fellowship — Recruited (Middle-earth API) Open & run this endpointPOST https://funapi.dev/api/webhooks/v1/subscriptions — Registered, includes a signingSecret (Webhooks API) Open & run this endpointPOST https://funapi.dev/api/webhooks/v1/trigger — Delivered to one or more subscriptions (Webhooks API) Open & run this endpointPOST https://funapi.dev/api/office/v1/employees — Hired (The Office API) Open & run this endpointPOST https://funapi.dev/api/dinopark/v1/dinosaurs — Created (Dino Park API) Open & run this endpointPOST https://funapi.dev/api/dinopark/v1/incidents/breach — Incident logged (Dino Park API) Open & run this endpointPOST https://funapi.dev/api/marvel/v1/heroes — Recruited (Marvel API) Open & run this endpointPOST https://funapi.dev/api/marvel/v1/missions — Mission created (Marvel API) Open & run this endpointPOST https://funapi.dev/api/got/v1/nobles — Created (Game of Thrones API) Open & run this endpointPOST https://funapi.dev/api/got/v1/battles — Battle resolved (Game of Thrones API) Open & run this endpointPOST https://funapi.dev/api/rickandmorty/v1/characters — Created (Rick and Morty API) Open & run this endpoint…and 19 more endpoints across the catalog.
All HTTP status codes · All 39 mock REST APIs · Getting started guide
Last updated