HTTP 415 — Unsupported Media Type

The request entity has a media type which the server or resource does not support

When to use it

Use status 415 when this is the correct HTTP response semantic: The request entity has a media type which the server or resource does not support

Request and response example

GET /protected-resource HTTP/1.1
Host: api.example.com

HTTP/1.1 415 Unsupported Media Type
Content-Type: application/json

{"error":"Request cannot be completed"}

Related status codes

400, 401, 402, 403

References

MDN · RFC 9110