--- title: "415 Unsupported Media Type — what it means and how to fix it" description: "The server will not accept the format of the body you sent. What causes an HTTP 415, what to try as a visitor, and what to check if it is your own site." url: https://atoneplace.net/error/415/ site: "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 - [404 Not Found](https://atoneplace.net/error/404/) - [403 Forbidden](https://atoneplace.net/error/403/) - [401 Unauthorized](https://atoneplace.net/error/401/) - [429 Too Many Requests](https://atoneplace.net/error/429/) - [400 Bad Request](https://atoneplace.net/error/400/) - [413 Content Too Large](https://atoneplace.net/error/413/) - [422 Unprocessable Content](https://atoneplace.net/error/422/) - [405 Method Not Allowed](https://atoneplace.net/error/405/) - [409 Conflict](https://atoneplace.net/error/409/) - [408 Request Timeout](https://atoneplace.net/error/408/) - [410 Gone](https://atoneplace.net/error/410/) - [451 Unavailable For Legal Reasons](https://atoneplace.net/error/451/) ## Sources - Hypertext Transfer Protocol (HTTP) Status Code Registry — IANA (https://www.iana.org/assignments/http-status-codes/) - RFC 9110: HTTP Semantics — IETF (https://www.rfc-editor.org/rfc/rfc9110.html)