# unsupported_media_type

> 415 Unsupported media type. The body isn’t a type the endpoint reads: JSON for most, a multipart form for file uploads, and only the file types listed for files.

| Status                     | Code                     | Retry?          |
| -------------------------- | ------------------------ | --------------- |
| 415 Unsupported media type | `unsupported_media_type` | After fixing it |

## What it means

The body isn’t a type the endpoint reads: JSON for most, a multipart form for file uploads, and only the file types listed for files.

## Common causes

- `Content-Type` is missing or isn’t `application/json`.
- A file upload isn’t `multipart/form-data`.
- The file is a type Messages can’t send.

## What to do

Send `Content-Type: application/json`.

## Can I retry it?

Only after you fix what the message names. Until then the same request gets the same answer.

## What the answer looks like

The answer, `415`:

```json
{
  "error": {
    "code": "unsupported_media_type",
    "message": "Send `Content-Type: application/json`.",
    "hint": "Send `Content-Type: application/json`.",
    "doc_url": "https://usebluebot.com/docs/errors/unsupported_media_type",
    "request_id": "req_1Hq2LxW9cVbN3mKpRtYs0a"
  }
}
```

Branch on `code`, which never changes. `message` and `hint` are written for people and may be reworded. Quote `request_id` when you write to support.

## Related

- [Errors](https://usebluebot.com/docs/errors): the envelope and every code
- [Idempotency](https://usebluebot.com/docs/concepts/idempotency): retrying without sending twice
- [Limits](https://usebluebot.com/docs/limits): every cap and what happens when you reach it
