HTTP 415 Unsupported Media Type — What It Means & How to Fix It
Error4xx client error
Overview
The HTTP 415 Unsupported Media Type status code indicates the server refuses the request because the content type or encoding is not supported.
Key Details
- This occurs when the Content-Type header in the request does not match what the server expects.
- Common when sending JSON to an endpoint that expects form data, or vice versa.
- The server should indicate which content types are accepted.
- Check both Content-Type and Content-Encoding headers.
Common Causes
- Sending application/json when the server expects application/x-www-form-urlencoded.
- Missing Content-Type header on a POST or PUT request.
- Using an unsupported content encoding.
- Sending XML to a JSON-only API endpoint.
Steps
- 1Check the API documentation for the expected Content-Type.
- 2Set the correct Content-Type header in your request.
- 3Ensure the request body format matches the Content-Type header.
- 4Try common content types: application/json, application/x-www-form-urlencoded, multipart/form-data.
Tags
httpclient-errormedia-typecontent-type
Related Items
More in 4xx Client Error
http-400-bad-requestHTTP 400 Bad Request — What It Means & How to Fix It
Errorhttp-401-unauthorizedHTTP 401 Unauthorized — What It Means & How to Fix It
Errorhttp-402-payment-requiredHTTP 402 Payment Required — What It Means & How to Fix It
Errorhttp-403-forbiddenHTTP 403 Forbidden — What It Means & How to Fix It
Errorhttp-404-not-foundHTTP 404 Not Found — What It Means & How to Fix It
Errorhttp-405-method-not-allowedHTTP 405 Method Not Allowed — What It Means & How to Fix It
ErrorFrequently Asked Questions
It means the server does not support the content type specified in your request. Check the Content-Type header and ensure it matches what the API expects.