API-004 API Origin: Application & API Last updated 13 Oct 2026

Unsupported Media Type

The API cannot process the request because the media type or Content-Type format is not supported by the endpoint.

Meaning

The API cannot process the request because the media type or Content-Type format is not supported by the endpoint.

Common causes

  • Incorrect Content-Type header
  • Unsupported request format
  • API expects JSON but received form data
  • API expects XML but received JSON
  • Incorrect request body encoding

⚡ Quick fix

  1. Set the correct Content-Type header
  2. Send the request in a supported format
  3. Verify the API documentation
  4. Ensure the request body matches the declared media type

Detailed fix by platform

JavaScript

  1. Set Content-Type to application/json when sending JSON
  2. Use the correct request body format

PHP

  1. Set the appropriate Content-Type header
  2. Encode request data according to the API requirements

REST

  1. Check the endpoint's supported media types
  2. Use the correct Accept and Content-Type headers

How to diagnose

  1. Inspect the Content-Type header —
  2. Check the request body format —
  3. Review supported media types in the API documentation —
  4. Compare Accept and Content-Type headers —

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Application & API. Errors that are often confused with or caused by this one (click to open):

400 — HTTP 400 Bad Request (HTTP)400406 — HTTP 406 Not Acceptable (HTTP)406415 — HTTP 415 Unsupported Media Type (HTTP)415API-004

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.