The syntax is fine and the server understood the request, but the content is semantically wrong — a valid date in the past where a future one is required, a transfer that would overdraw an account.
Defined in RFC 9110 §15.5.21 — 422 Unprocessable Content · MDN reference
Defined for WebDAV in RFC 4918 §11.2 as "Unprocessable Entity", then generalised and renamed by RFC 9110.
Validation failures: an email that is not an email, an end date before a start date, a quantity of zero on an order line, a field that is fine in isolation and wrong in context.
The distinction from 400 is the point: 400 means "I could not read this", 422 means "I read it, and no". Clients should surface them to users differently.
Do not retry. Map the per-field errors onto the form the user is looking at — this is the one error class where the API can tell the client exactly what to fix, and a client that flattens it to "invalid input" throws that away.
73 endpoints in this playground answer with 422. Every one is free, needs no signup, and can be called from the browser or with curl.
POST https://funapi.dev/api/webhooks/v1/ordering — Generate duplicate and reversed envelopes without making outbound requests (Webhooks API) Open & run this endpointPOST https://funapi.dev/api/bank/v1/accounts — Open a new account (Bank API) Open & run this endpointPOST https://funapi.dev/api/bank/v1/transfers — Transfer money between accounts (Bank API) Open & run this endpointPOST https://funapi.dev/api/shop/v1/carts/{id}/checkout — Check out (idempotent, coupon-aware) (Shop API) Open & run this endpointPOST https://funapi.dev/api/shop/v1/reservations — Hold stock without overselling (Shop API) Open & run this endpointGET https://funapi.dev/api/shop/v1/reservations/{id} — Observe stock reservation expiry (Shop API) Open & run this endpointPOST https://funapi.dev/api/shop/v1/reservations/{id}/confirm — Consume reserved stock using its version (Shop API) Open & run this endpointGET https://funapi.dev/api/payments/v1/payments — List synthetic payments (Payment Lifecycle API) Open & run this endpointPOST https://funapi.dev/api/payments/v1/payments — Authorize a synthetic payment; retry with the same idempotency key (Payment Lifecycle API) Open & run this endpointGET https://funapi.dev/api/payments/v1/payments/{id} — Read a payment (Payment Lifecycle API) Open & run this endpointPOST https://funapi.dev/api/payments/v1/payments/{id}/capture — capture a synthetic payment (Payment Lifecycle API) Open & run this endpointPOST https://funapi.dev/api/payments/v1/payments/{id}/refund — refund a synthetic payment (Payment Lifecycle API) Open & run this endpointPOST https://funapi.dev/api/payments/v1/payments/{id}/dispute — dispute a synthetic payment (Payment Lifecycle API) Open & run this endpointGET https://funapi.dev/api/payments/v1/events — Read deterministic webhook envelopes; reverse order or duplicate an event (Payment Lifecycle API) Open & run this endpointGET https://funapi.dev/api/reservations/v1/slots — List UTC slots with IANA display time zones (Reservation API) Open & run this endpointPOST https://funapi.dev/api/reservations/v1/holds — Reserve capacity temporarily (Reservation API) Open & run this endpointGET https://funapi.dev/api/reservations/v1/holds/{id} — Read a hold and observe expiry (Reservation API) Open & run this endpointPOST https://funapi.dev/api/reservations/v1/holds/{id}/confirm — Confirm a live hold (Reservation API) Open & run this endpointDELETE https://funapi.dev/api/reservations/v1/holds/{id} — Release a hold or cancel a confirmed reservation (Reservation API) Open & run this endpointPOST https://funapi.dev/api/worldcup/v1/matches/{id}/simulate — Kick off and simulate a match — updates score, goal events and standings (admin only) (World Cup 2026 API) Open & run this endpointGET https://funapi.dev/api/worldcup/v1/players/top-scorers — Golden Boot race — top scorers so far (World Cup 2026 API) Open & run this endpointPOST https://funapi.dev/api/worldcup/v1/tickets — Buy match tickets — limited seats, 409 when sold out (World Cup 2026 API) Open & run this endpointPOST https://funapi.dev/api/worldcup/v1/predictions — Predict the 2026 world champion (World Cup 2026 API) Open & run this endpointPUT https://funapi.dev/api/fiba/v1/teams/{id}/staff — Name the head coach and captain — optimistic concurrency via If-Match (FIBA World Cup API) Open & run this endpointPOST https://funapi.dev/api/fiba/v1/games/{id}/simulate — Tip off — four quarters plus overtime until somebody wins (admin only) (FIBA World Cup API) Open & run this endpoint…and 48 more endpoints across the catalog.
All HTTP status codes · All 55 mock REST APIs · Getting started guide
Last updated