unsupported_media_type
HTTP 415 · code unsupported_media_type
The body is not in a format the endpoint accepts.
When Photon sends it
Section titled “When Photon sends it”Sent by photon.DecodeJSON when the request declares a Content-Type other than application/json or a +json type (a request with no Content-Type is accepted). Refusing other types is also a CSRF defence: a browser form cannot send application/json cross-site without a preflight.
What the client should do
Section titled “What the client should do”Send the body with Content-Type: application/json.
Example response
Section titled “Example response”{ "type": "https://photon.agenticmarket.dev/errors/unsupported_media_type", "title": "unsupported media type", "status": 415, "code": "unsupported_media_type"}Match on the code field rather than on title, which is meant for people and may change. See all error codes.