Skip to content

406 Not Acceptable ​

Meaning ​

The server cannot generate a response that is acceptable according to the Accept headers sent in the request.

When to Use ​

When content negotiation fails: the client’s Accept (or similar) headers specify a response format that the server cannot fulfill, so no suitable representation is available.

Example ​

A client requests /data with Accept: text/xml, but the server only produces JSON; it returns 406 Not Acceptable to indicate it cannot provide content in the requested format.

When Not to Use ​

Do not use if the server chooses to ignore the Accept header and send a default format (then 200 could be used). Only use 406 when the server actively honors Accept headers and finds no match.

Source ​

RFC 9110


Released under the MIT License.