HTTP status codes / 4xx — Client error

415 Unsupported Media Type

What it means

The server cannot handle the request body's format, as declared by its Content-Type.

What causes it

Sending JSON with a text/plain content-type (or vice versa), form data where JSON is expected, missing multipart boundary.

How to fix it

Set the Content-Type header to exactly what the API expects — application/json is the usual answer. For file uploads, let the HTTP library set the multipart header itself.