SiteError.comYour friendly guide to HTTP status codes
Status CodesBlog
  1. Home
  2. 4xx Client Error
  3. 415 Unsupported Media Type

415 Unsupported Media Type

📼
415
Unsupported Media Type
!
?

Example HTTP Response

HTTP Response
HTTP/1.1 415 Unsupported Media Type
Accept: application/json
Common Causes
  • Sending XML when JSON expected
  • Wrong Content-Type header
  • Unsupported file format
Technical Details

What does this mean?

Can't read that! Like handing someone a Betamax tape in 2024. The server doesn't speak that format.

Technical Definition

The media format of the requested data is not supported by the server.

RFC Says

"The 415 (Unsupported Media Type) status code indicates that the origin server is refusing to service the request because the payload is in a format not supported by this method on the target resource. The format problem might be due to the request's indicated Content-Type or Content-Encoding, or as a result of inspecting the data directly."

Plain English:

415 means 'I don't understand the format of the data you sent me.' For example, sending XML when the API only accepts JSON, or sending an image format the server doesn't support. Check your Content-Type header.

Common Misinterpretation

Don't confuse 415 with 400. Use 415 specifically when the content format/encoding is wrong. Use 400 when the content is in the right format but has validation errors. A malformed JSON payload could be either - use 400 if you can't even parse it.

View RFC Documentation
Code Snippets

Ready-to-use code for returning this HTTP status in your application:

Node.js
// Express.js
app.get('/example', (req, res) => {
  res.status(415).json({
    error: 'Unsupported Media Type',
    message: 'Your error message here'
  });
});

// Native HTTP
const http = require('http');

http.createServer((req, res) => {
  res.writeHead(415, { 'Content-Type': 'application/json' });
  res.end(JSON.stringify({
    error: 'Unsupported Media Type',
    message: 'Your error message here'
  }));
}).listen(3000);

415 Unsupported Media Type FAQ

What causes a 415 Unsupported Media Type error?

Sending XML when JSON expected. Wrong Content-Type header. Unsupported file format.

414 URI Too Long416 Range Not Satisfiable

Popular Status Codes

  • 200 OK
  • 301 Moved Permanently
  • 302 Found
  • 400 Bad Request
  • 401 Unauthorized
  • 403 Forbidden
  • 404 Not Found
  • 500 Internal Server Error
  • 502 Bad Gateway
  • 503 Service Unavailable

Compare Codes

  • 401 vs 403
  • 301 vs 302
  • 404 vs 410
  • 500 vs 502
  • Compare any codes →

Categories

  • Informational
  • Success
  • Redirection
  • Client Error
  • Server Error
  • NGINX
  • Cloudflare
  • AWS ELB
  • Microsoft IIS

Tools

  • Cheat Sheet
  • Status Code Quiz
  • URL Checker
  • API Playground
  • Blog

© 2026 SiteError.com. All rights reserved.