Skip to content

4xx Client error

406 Not Acceptable

The server can't return the format the client asked for.

What 406 means

The Accept header requested a content type (or language) the server can't produce, e.g. Accept: application/xml from a JSON-only API.

Common causes

  • A restrictive Accept, Accept-Language or Accept-Encoding header.

How to fix it

If you're calling an API

  • Send Accept: application/json, or remove the Accept header.

If you run the server

  • Consider falling back to your default format instead of 406.

Should you retry?

After changing the Accept header.

Example response

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

{
  "type": "about:blank",
  "title": "Not Acceptable",
  "status": 406,
  "detail": "The server can't return the format the client asked for."
}

Related headers: Accept.

Defined in: RFC 9110 (HTTP Semantics). 406 is a client error: change the request before retrying.

Debugging an API call? Convert your request with the cURL converter, check the response with the JSON formatter, or see whether the API is down on its status page.

HTTP 406 FAQ

What does HTTP 406 mean?

406 Not Acceptable: The server can't return the format the client asked for. The Accept header requested a content type (or language) the server can't produce, e.g. Accept: application/xml from a JSON-only API.

Is 406 a client or server error?

It's a client error (4xx): something about the request needs to change before it can succeed.

How do I fix a 406 error?

Send Accept: application/json, or remove the Accept header.

Should I retry after a 406?

After changing the Accept header.

Other 4xx status codes

All HTTP status codes