415 Unsupported Media Type
The server refuses to accept the request because the payload format is unsupported.
Definition (RFC 9110)
HTTP status code 415 415 Unsupported Media Type is defined in RFC 9110 (HTTP Semantics), Section 15.5.16 — the current authoritative specification for HTTP semantics, published June 2022, which obsoletes the older RFC 7231 and RFC 2616.
Description
415 Unsupported Media Type is returned when the client sends a request body in a format that the server does not support or cannot process. This is typically indicated by the Content-Type header not matching what the server expects.
Common in API development when the client sends XML but the API only accepts JSON, or vice versa.
Common Causes
- Sending XML to an API that only accepts JSON (
Content-Type: application/json) - Missing or incorrect
Content-Typeheader - File upload in unsupported format
- Sending form data (
multipart/form-data) when JSON is expected
How to Fix
- Set the correct
Content-Typeheader matching the body format - Check API documentation for supported media types
- For file uploads, verify the accepted MIME types
- Ensure your HTTP client serializes the body in the expected format
Check your website's HTTP status code
Check now →