The server does not support the request body's media type or content encoding.
415 Unsupported Media Type means the body's Content-Type (or Content-Encoding) is not something this endpoint accepts. If the problem is the encoding, the server should list supported ones in Accept-Encoding; for media types, it can advertise Accept-Post or Accept-Patch.
application/x-www-form-urlencoded) to an endpoint that expects application/json.application/json when the API expects application/merge-patch+json or json-patch+json.curl -H "Content-Type: application/json" -d '{...}'.| Header | Role |
|---|---|
Content-Type | The request header that was rejected. |
Accept-Post | Media types accepted by POST (W3C LDP). |
Accept-Patch | Media types accepted by PATCH (RFC 5789). |
HTTP/1.1 415 Unsupported Media Type
Accept-Post: application/json
Content-Type: application/json
{"error": "Content-Type must be application/json"}