client error RFC 9110
HTTP 415 Unsupported Media Type
The Content-Type of the request body is not one the server can process.
What it means
The server understood the URL and method but the Content-Type header identifies a format it doesn't handle. For example, sending `Content-Type: application/xml` to a JSON-only API. Also thrown when Content-Type is missing on POST/PUT.
When servers send it
- •POST with `Content-Type: application/xml` to a JSON API
- •Uploading an image type the endpoint doesn't accept
- •Missing Content-Type header entirely
What the client does
Retries with the correct Content-Type. Reads the `Accept-Post` or `Accept` header if provided.
Common causes
- •Client library not setting Content-Type automatically
- •Sending `text/plain` when server expects `application/json`
- •File uploads without proper `multipart/form-data` boundary
How to fix it
- 1.Explicitly set `Content-Type: application/json` (or whatever the API expects)
- 2.Check the API docs for supported Content-Types
- 3.For file upload: ensure the FormData boundary is set (fetch does this automatically; some libraries don't)
Similar codes
400 Bad Request client error
Server cannot process the request due to a client-side error — malformed syntax, invalid JSON, missing required fields.
401 Unauthorized client error
Authentication is required and either missing or invalid — the client is not identified.
403 Forbidden client error
Server understood who you are but refuses to authorize the request — permission denied.
404 Not Found client error
The requested URL does not exist on this server.
405 Method Not Allowed client error
The URL exists but doesn't support the HTTP method the client used.
← All HTTP status codes · HTTP status cheat sheet · HTTP headers reference