415 Unsupported Media Type
You sent data in a format the server doesn't accept for this endpoint, or didn't say what format it was. The Content-Type header is the usual culprit.
Quick checks
- Check the Content-Type header your client sends.
- Check the API docs for the expected format.
If you’re visiting the site
Upload a supported file type
- If an upload fails, convert the file to a type the site lists (for example JPEG or PNG instead of HEIC).
If you run the site
Send the right Content-Type
- JSON:
Content-Type: application/json. Forms:application/x-www-form-urlencodedormultipart/form-data. - With curl,
-ddefaults to form encoding; add-H 'Content-Type: application/json'for JSON, or use--json(curl 7.82+).
- JSON:
Check encoding
- Some APIs reject
Content-Encoding: gzipbodies or unexpected charsets.
- Some APIs reject
Still not working?
If the header is right and the server still returns 415, the endpoint may not support that operation's format at all; check the docs or ask the provider.
See what’s happening
LightAtom's connections view shows which server your app talks to, to confirm requests reach the intended API.
Frequently asked questions
What causes 415 Unsupported Media Type?
A request body whose Content-Type the server doesn't handle, often JSON sent without the application/json header, or a file type the endpoint doesn't accept.
How do I send JSON with curl?
curl --json '{"a":1}' https://api.example.com/ sets the right headers (curl 7.82 and later, including the curl in macOS). On older versions, add -H 'Content-Type: application/json' with -d.
Is 415 the same as 406?
No. 415 is about the format you sent. 406 Not Acceptable is about the format you asked to receive (the Accept header).