HTTP Status Codes

415 Unsupported Media Type

The server refuses the request because the body's Content-Type is one it does not support — e.g. sending XML to a JSON-only endpoint.

What it means

415 Unsupported Media Type rejects the request payload's format. It is the request-side mirror of 406: 406 is about what the client will accept in the response, 415 is about what the server accepts in the request. Fix it by sending a supported Content-Type.

HTTP RESPONSE
HTTP/1.1 415 Unsupported Media Type
Accept-Post: application/json

Why it matters

  • It clearly tells clients the payload format is wrong, not the data itself.
  • Advertising accepted types (e.g. Accept-Post) makes the error self-correcting.

Common mistakes

  • Forgetting to set Content-Type: application/json on a JSON POST.
  • Confusing 415 (request body type) with 406 (response negotiation).

How WebInspect checks this

  • The API Inspector reports request/response Content-Type and flags media-type mismatches.