415 Unsupported Media Type
4xx Client Error
RFC 9110
Wrong content type — the server can't process what you sent.
What 415 Unsupported Media Type means {#what}
The format of the request body isn’t supported by this endpoint. Usually means a missing or wrong Content-Type header — sending XML to a JSON-only API, or forgetting application/json entirely.
When you’ll see a 415 {#when}
- Missing
Content-Type: application/jsonheader - Sending
multipart/form-datato an endpoint expecting JSON - Wrong encoding or media type
When to use 415 {#use}
- Include the list of accepted types in the error response