At One Place

HTTP 415 — Unsupported Media Type

HTTP 415
Unsupported Media Type
The server will not accept the format of the body you sent.

What 415 actually means

The `Content-Type` of the request body is one the endpoint does not handle. Most often this is an API that only accepts `application/json` receiving a form-encoded body, or receiving no `Content-Type` at all because a client library omitted it. It is about the request body, not the response — that is 406 — and it is the most consistently self-inflicted error in this list, because the fix is almost always one header.

Common causes

  • Sending JSON without `Content-Type: application/json`
  • Sending `application/x-www-form-urlencoded` to a JSON-only endpoint
  • A charset parameter the server rejects, such as `application/json; charset=utf-8` on a strict parser
  • Uploading a file type the endpoint refuses
  • A multipart upload with a malformed or missing boundary parameter

If you're just trying to view the page

  1. If you were uploading a file, convert it to a format the site accepts — the accepted list is usually shown near the upload button
  2. Otherwise there is nothing to change on your side; this is a problem in the software making the request

If it's your site

  1. Set `Content-Type` explicitly on every request with a body; many HTTP clients do not infer it
  2. On the server, list the accepted types in the error body so the client can correct itself
  3. Accept media type parameters such as `charset` rather than requiring an exact string match
  4. Check that a proxy has not rewritten or dropped the `Content-Type` header

Reference

Status code
415
Reason phrase
Unsupported Media Type
Category
4xx — Client Error
Defined in
RFC 9110 §15.5.16

Common questions

What does HTTP 415 mean?
The server will not accept the format of the body you sent. The `Content-Type` of the request body is one the endpoint does not handle. Most often this is an API that only accepts `application/json` receiving a form-encoded body, or receiving no `Content-Type` at all because a client library omitted it.
How do I fix a 415 error?
If you were uploading a file, convert it to a format the site accepts — the accepted list is usually shown near the upload button
Is 415 a client error or a server error?
415 is in the 4xx range, which means client error. The request itself was the problem, so retrying it unchanged will usually return the same code.

Related pages

Sources

  1. Hypertext Transfer Protocol (HTTP) Status Code Registry — IANA
  2. RFC 9110: HTTP Semantics — IETF

How these figures are compiled and checked