// http 4xx · client error

HTTP 415 Unsupported Media Type

The request body format isn't supported.

What HTTP 415 Unsupported Media Type means

415 Unsupported Media Type means the server rejected the request because the body's format — declared in the `Content-Type` header — isn't one it can handle. Sending XML to a JSON-only endpoint is a typical cause.

Which category is it?

415 is a 4xx code — Client error. 4xx means the request has a problem the client must fix — bad syntax, missing authentication, or a resource that isn't there. It's the caller's responsibility.

Common causes

  • A `Content-Type` the endpoint doesn't accept
  • Missing `Content-Type` header
  • Sending form data where JSON is expected (or vice versa)

How to fix it

  • Set `Content-Type` to a format the API accepts (often `application/json`)
  • Encode the body to match the declared type

Other client error (4xx) codes