415 Unsupported Media Type means the server refuses the body because of its format, as stated by the Content-Type header.
HTTP/1.1 415 Unsupported Media TypeCommon causes
- Sending JSON without Content-Type: application/json, so the server reads it as form data or plain text.
- Uploading a file type the endpoint does not accept.
- A Content-Encoding the server does not support.
How to fix it
- Set the Content-Type header to match the body, usually application/json.
- Check which formats the endpoint accepts in its documentation.