415 Unsupported Media Type

The server doesn't accept this Content-Type.

4xx · Client error

What it means

The server won't accept the body's format, given by Content-Type, or its encoding, given by Content-Encoding. It may list the formats it does accept in Accept, Accept-Post or Accept-Encoding.

Why you're seeing it

  • Sending JSON without Content-Type: application/json.
  • Sending form data to an endpoint that only reads JSON, or the reverse.
  • A compressed body the server can't decode.

How to fix it

  • Set Content-Type to match the body.
  • In curl, --json sets the header for you; -d alone sends application/x-www-form-urlencoded.

Example response

HTTP/1.1 415 Unsupported Media Type
Accept-Post: application/json
Content-Length: 0