415 Unsupported Media Type: the request body format is wrong
415 Unsupported Media Type means the server refuses the request body because of its format, usually a missing or wrong Content-Type header.
415 Unsupported Media Type means the server won’t accept the request body because of its format. You sent form data to an endpoint that expects JSON, forgot the Content-Type header, or used a compression the server can’t decode.
Definition
RFC 9110, section 15.5.16 says the problem can come from the request’s Content-Type, its Content-Encoding, or from the server inspecting the data directly. When an unsupported content coding is the cause, the response should include an Accept-Encoding header listing the codings it does accept. For PATCH, RFC 5789 defines Accept-Patch to list supported patch formats.
Don’t confuse it with 406 Not Acceptable: 415 is about what the client sends, 406 about what it’s willing to receive.
Common causes
- A missing or wrong
Content-Type, such asapplication/x-www-form-urlencodedortext/plainsent to a JSON API. Frameworks such as Spring and ASP.NET Core reject these with 415. - An upload in a file type the endpoint doesn’t accept.
- A gzip-compressed request body sent to a server that doesn’t decompress requests.
- JavaScript
fetch()calls that sendJSON.stringify(data)without setting the header, so the body goes out astext/plain.
How to fix it
# curl: declare the JSON body
curl -X POST https://api.example.com/v1/contacts \
-H 'Content-Type: application/json' \
-d '{"email":"sara@example.com"}'
// fetch()
fetch('/api/v1/contacts', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ email: 'sara@example.com' })
});
On the server, return a message that names the accepted types so integrators can fix their call quickly.
SEO impact
Crawlers don’t send request bodies, so 415 has no direct effect on indexing. It does turn up in SEO work through APIs: submitting URLs to IndexNow by POST, for instance, needs a JSON body with the right header, which the IndexNow submitter handles for you. If a normal page returns 415 to a GET, it’s a server bug; Google would treat it as a 4xx and drop the page. Check pages with the HTTP status checker.
Example
POST /api/v1/contacts HTTP/1.1
Host: api.example.com
Content-Type: text/plain
email=sara@example.com
HTTP/1.1 415 Unsupported Media Type
Content-Type: application/json
{"error":"Expected Content-Type: application/json"} Frequently asked questions
What is the difference between 415 and 400?
400 is a general “this request is malformed.” 415 is specific: the server can’t handle the format of the body you sent, usually because of the Content-Type header.
How do I fix a 415 error in fetch or Postman?
Set the Content-Type header to match the body, usually application/json for JSON, and make sure the body really is in that format.
Does a 415 error affect SEO?
Not directly, since crawlers send no request body. It matters for API work such as URL submission tools, and a page that returns 415 to a GET would be dropped like any 4xx page.