HTTP 415 Unsupported Media Type

The server does not support the media type of the request payload.

4xx Client Error

415

Unsupported Media Type

Description

The 415 Unsupported Media Type status code indicates that the origin server is refusing to service the request because the payload is in a format not supported by this method on the target resource. The format problem might be due to the request's indicated Content-Type or Content-Encoding, or as a result of inspecting the data directly. For example, a server might return 415 if it only accepts JSON but the client sends XML, or if the client omits the Content-Type header entirely when one is required.

When Is It Used?

Returned when the Content-Type of the request is not supported by the endpoint. For example, sending text/xml to an endpoint that only accepts application/json, uploading an unsupported file format, or sending form data when JSON is expected.

Example Response

HTTP/1.1 415 Unsupported Media Type
Content-Type: application/json

{"error": "unsupported_media_type", "message": "Content-Type must be application/json"}

Look Up Any Status Code

Browse all status codes