HTTP 415 — Unsupported Media Type
4xx Client Error
What it means
The server does not accept the Content-Type the client sent.
What to do about it
The usual cause is a JSON body sent without Content-Type: application/json, or a form posted as JSON to an endpoint expecting multipart/form-data.
Where it sits
415 belongs to the 4xx family: The request contains something the server will not or cannot process. The fix is normally on the client side.
HTTP/1.1 415 Unsupported Media Type
Checking it yourself
# see the status code and headers only
curl -sI https://example.com/path
# follow redirects and print each hop
curl -sIL -o /dev/null -w "%{http_code} %{url_effective}\n" https://example.com/path
# JavaScript
const r = await fetch(url);
console.log(r.status, r.statusText);
How this code behaves
| Cacheable by default | No — caches must not store this response unless explicit cache headers permit it. |
| Safe to retry | No. Retrying an identical request will produce the same result — the request itself must change. |
| Effect on search indexing | No direct effect. |
Returning 415 correctly
# nginx
return 415;
# Express
res.status(415).json({ error: 'Unsupported Media Type' });
# Go
w.WriteHeader(415)
# Python (Flask)
return jsonify(error='Unsupported Media Type'), 415;
Frequently asked questions
What does HTTP 415 mean?
The server does not accept the Content-Type the client sent.
How do I fix a 415 error?
The usual cause is a JSON body sent without Content-Type: application/json, or a form posted as JSON to an endpoint expecting multipart/form-data.
Is 415 a client or server problem?
A client problem by definition — the request needs to change. That said, a 4xx can still be the server’s fault if it is misconfigured and rejecting valid requests.