The server cannot produce a representation matching your Accept header.
Defined in RFC 9110 §15.5.7 — 406 Not Acceptable · MDN reference
Content negotiation that cannot be satisfied — a client asking for text/csv from an endpoint that only speaks JSON, or a version in an Accept header the server has retired.
Worth provoking if your client sends a narrow Accept header, because the failure looks like a server fault and is actually a negotiation failure.
Do not retry with the same Accept header. Either fall back to a type the server does offer, or fail with a message naming what you asked for. A 406 that a client turns into "server error" wastes an on-call engineer's evening on a header.
2 endpoints in this playground answer with 406. Every one is free, needs no signup, and can be called from the browser or with curl.
GET https://funapi.dev/api/friends/characters — Accept header requests an unsupported media type (Friends API) Open & run this endpointGET https://funapi.dev/api/protocol/v1/export/documents — Unsupported Accept value (Protocol Lab API) Open & run this endpointAll HTTP status codes · All 39 mock REST APIs · Getting started guide
Last updated