loot.tools
406

Not Acceptable

4xx Client Error

The server can't produce a response matching the Accept headers.

406 Not Acceptable is content negotiation falling through: the request's Accept headers (Accept, Accept-Language, Accept-Encoding) ruled out every format the server can produce. Demand XML from an endpoint that only speaks JSON and a strict server answers 406. Most servers just ignore the mismatch and send what they have, so a real 406 usually means the API takes negotiation seriously.

What 406 looks like on the wire

GET /api/report HTTP/1.1
Host: api.example.com
Accept: application/xml

HTTP/1.1 406 Not Acceptable
Content-Type: application/json

{"supported": ["application/json", "text/csv"]}

About 4xx Client Error

The request has a problem the client needs to fix, like a bad URL, missing auth, or invalid input.

How to fix 406 Not Acceptable

  • Loosen or drop the Accept header so the server can pick a format it supports.
  • Check the API docs for which content types the endpoint can return.
  • Watch for an SDK or client setting a default Accept header you didn't choose.

Where it's defined

406 Not Acceptable is defined in RFC 9110 §15.5.7. MDN's 406 reference covers browser behavior and examples.

Looking for a different one? See the full HTTP status code reference.