# 406 Not Acceptable

> The server cannot produce a response matching the Accept headers sent by the client.

Source: https://apiguide.dev/status-codes/406
Class: client-error
Defined in: RFC 9110, Section 15.5.7 <https://www.rfc-editor.org/rfc/rfc9110.html#section-15.5.7>
Updated: 2026-07-09

## What does HTTP status code 406 mean?

The 406 Not Acceptable status code indicates that the server cannot generate a response format that matches the content negotiation criteria specified in the request's `Accept` headers.

## When to use it in APIs

Use when a client requests data in XML (`Accept: application/xml`) but your API only supports JSON (`Accept: application/json`).

## How it compares to other codes

* **415 Unsupported Media Type**: Deals with the request payload sent *by* the client. 406 deals with the response payload desired *by* the client.
