The HTTP 415 Unsupported Media Type status code belongs to the 4xx client error category of the HTTP specification. These responses indicate that the server refuses to process a request because the request payload uses a media format that the server does not support.
A 415 Unsupported Media Type response typically occurs
when the client sends data using a Content-Type that the
server does not recognize or accept.
This error frequently appears in API environments where servers expect specific content formats such as JSON or XML but receive an unsupported or incorrect media type instead.
Content-Type request headerHTTP/1.1 415 Unsupported Media Type Content-Type: application/json
Servers may reject requests when the Content-Type header
does not match the media formats accepted by the endpoint.
Many modern APIs require requests to be submitted using specific content formats.
POST /api/users Content-Type: application/xml
If the server only accepts JSON payloads, the request may be rejected with a 415 Unsupported Media Type response.
Expected Content-Type: application/json
Content-Type header in the requestProper API documentation and validation rules help prevent clients from submitting requests using unsupported media formats.
The HTTP 415 Unsupported Media Type status code indicates that a server refused to process a request because the request body uses a media type that the server does not support.
Ensuring that requests include the correct Content-Type
header and compatible payload formats helps prevent 415 errors when
interacting with APIs and web services.