Skip to content

4xx Client error

415 Unsupported Media Type

The server doesn't accept the body's format.

What 415 means

The Content-Type header doesn't match what the endpoint accepts, e.g. form data sent to a JSON endpoint, or a missing Content-Type.

Common causes

  • Sending JSON without Content-Type: application/json.
  • Sending form data or XML to a JSON-only endpoint.

How to fix it

If you're calling an API

  • Set Content-Type: application/json (curl: --json or -H). Our cURL converter adds it for you.

If you run the server

  • Say in the body which content types are accepted (Accept-Post header for POST).

Should you retry?

After fixing Content-Type.

Example response

HTTP
HTTP/1.1 415 Unsupported Media Type
Content-Type: application/problem+json

{
  "type": "about:blank",
  "title": "Unsupported Media Type",
  "status": 415,
  "detail": "The server doesn't accept the body's format."
}

Related headers: Content-Type.

Defined in: RFC 9110 (HTTP Semantics). 415 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 415 FAQ

What does HTTP 415 mean?

415 Unsupported Media Type: The server doesn't accept the body's format. The Content-Type header doesn't match what the endpoint accepts, e.g. form data sent to a JSON endpoint, or a missing Content-Type.

Is 415 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 415 error?

Set Content-Type: application/json (curl: --json or -H). Our cURL converter adds it for you.

Should I retry after a 415?

After fixing Content-Type.

Other 4xx status codes

All HTTP status codes