The server could not understand the request — malformed JSON, a missing required field, or a parameter of the wrong type.
Defined in RFC 9110 §15.5.1 — 400 Bad Request · MDN reference
Malformed JSON, a query parameter of the wrong type, a missing required field, a payload the parser cannot make sense of at all.
The baseline negative test. It is also the code most often used where 422 would be more accurate, so check which one your API actually sends.
Never retry a 400 unchanged — the request is wrong and will be wrong the second time. Surface the server's error detail rather than a generic failure message; the whole value of a 400 is that it says what it did not understand.
168 endpoints in this playground answer with 400. Every one is free, needs no signup, and can be called from the browser or with curl.
GET https://funapi.dev/api/friends/v1/characters — List all characters (paginated) — v1, deprecated (Friends API) Open & run this endpointGET https://funapi.dev/api/friends/v1/characters/{id} — Get one character (Friends API) Open & run this endpointPOST 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 endpointPUT https://funapi.dev/api/friends/v1/characters/{id} — Update a character (Friends API) Open & run this endpointPOST https://funapi.dev/api/friends/v1/characters/bulk-delete — Bulk-delete characters by id (partial success supported) (Friends API) Open & run this endpointGET https://funapi.dev/api/friends/v1/episodes — List episodes, filter by season (Friends API) Open & run this endpointGET https://funapi.dev/api/friends/v2/characters — List characters — v2 (breaking change: job → occupation, re-wrapped) (Friends API) Open & run this endpointPOST https://funapi.dev/api/friends/v1/graphql — Run a query or mutation over character data (Friends API) Open & run this endpointGET https://funapi.dev/api/superheroes/v1/heroes — List heroes (paginated, filterable) (Superhero 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 endpointGET https://funapi.dev/api/pizza/v1/menu — Get the menu (Pizza Orders API) Open & run this endpointPOST https://funapi.dev/api/pizza/v1/orders — Place an order (validated) (Pizza Orders API) Open & run this endpointPUT https://funapi.dev/api/pizza/v1/orders/{id}/status — Update order status (Pizza Orders API) Open & run this endpointPATCH https://funapi.dev/api/pizza/v1/orders/{id} — Partially update an order (address or size) (Pizza Orders API) Open & run this endpointGET https://funapi.dev/api/coffee/v1/drinks — List drinks, filter by type (Coffee Shop API) Open & run this endpointPOST https://funapi.dev/api/coffee/v1/orders — Order a drink (Coffee Shop API) Open & run this endpointGET https://funapi.dev/api/football/v1/teams — List teams (paginated) (Football API) Open & run this endpointPOST https://funapi.dev/api/football/v1/matches — Simulate a match (Football API) Open & run this endpointGET https://funapi.dev/api/movies/v1/movies — List movies (filter, sort, paginate) (Movies API) Open & run this endpointGET https://funapi.dev/api/movies/v1/search/fuzzy — Typo-tolerant search (fuzzy match, "did you mean") (Movies API) Open & run this endpointPOST https://funapi.dev/api/movies/v1/movies — Add a movie (Movies API) Open & run this endpointPUT https://funapi.dev/api/movies/v1/movies/{id}/rating — Rate a movie (0–10 inclusive) (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 endpoint…and 143 more endpoints across the catalog.
All HTTP status codes · All 55 mock REST APIs · Getting started guide
Last updated