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.
59 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 — Create a character (Friends API) Open & run this endpointPOST https://funapi.dev/api/friends/v1/characters/bulk — Batch-create characters (array body, per-item validation) (Friends API) Open & run this endpointPOST https://funapi.dev/api/superheroes/v1/heroes — Register a new hero (Superhero API) Open & run this endpointPOST https://funapi.dev/api/superheroes/v1/heroes/versus — Simulate a fight between two heroes (Superhero API) Open & run this endpointPOST https://funapi.dev/api/pizza/v1/orders — Place an order (validated) (Pizza Orders API) Open & run this endpointPOST https://funapi.dev/api/coffee/v1/orders — Order a drink (Coffee Shop API) Open & run this endpointPOST https://funapi.dev/api/football/v1/matches — Simulate a match (Football API) Open & run this endpointPOST https://funapi.dev/api/movies/v1/movies — Add a movie (Movies API) Open & run this endpointPOST https://funapi.dev/api/movies/v1/movies/{id}/poster — Upload a movie poster (simulated multipart file upload) (Movies API) Open & run this endpointPOST https://funapi.dev/api/wizarding/v1/students — Enroll a student (Harry Potter API) Open & run this endpointPOST https://funapi.dev/api/galaxy/v1/characters — Add a character (Star Wars API) Open & run this endpointPOST https://funapi.dev/api/holmes/v1/suspects — Add a suspect to a case (Sherlock Holmes API) Open & run this endpointPOST https://funapi.dev/api/pokemon/v1/pokemon — Catch a new Pokémon (create) (Pokémon API) Open & run this endpointPOST https://funapi.dev/api/pokemon/v1/battles — Simulate a battle between two Pokémon (Pokémon API) Open & run this endpointPOST https://funapi.dev/api/middleearth/v1/fellowship — Recruit a new member (Middle-earth API) Open & run this endpointPOST https://funapi.dev/api/webhooks/v1/subscriptions — Register a webhook subscription (Webhooks API) Open & run this endpointPOST https://funapi.dev/api/webhooks/v1/trigger — Fire an event to all matching subscriptions (real HTTP POST) (Webhooks API) Open & run this endpointPOST https://funapi.dev/api/office/v1/employees — Hire a new employee (The Office API) Open & run this endpointPOST https://funapi.dev/api/dinopark/v1/dinosaurs — Add a dinosaur (409 if enclosure is at capacity) (Dino Park API) Open & run this endpointPOST https://funapi.dev/api/dinopark/v1/incidents/breach — Simulate a containment breach (random dinosaur & severity) (Dino Park API) Open & run this endpointPOST https://funapi.dev/api/marvel/v1/heroes — Recruit a new hero (Marvel API) Open & run this endpointPOST https://funapi.dev/api/marvel/v1/missions — Assign heroes to a new mission (Marvel API) Open & run this endpointPOST https://funapi.dev/api/got/v1/nobles — Add a noble to a house (Game of Thrones API) Open & run this endpointPOST https://funapi.dev/api/got/v1/battles — Simulate a battle between two houses (Game of Thrones API) Open & run this endpointPOST https://funapi.dev/api/rickandmorty/v1/characters — Add a character (Rick and Morty API) Open & run this endpoint…and 34 more endpoints across the catalog.
All HTTP status codes · All 55 mock REST APIs · Getting started guide
Last updated