# unsupported-media-type

<Badge variant="warning">415 Unsupported Media Type</Badge> <Badge variant="muted">unsupported-media-type</Badge>

| Field           | Value                                                   |
|-----------------|---------------------------------------------------------|
| **Type URI**    | `https://docs.kordiam.app/docs/errors/unsupported-media-type` |
| **HTTP Status** | `415 Unsupported Media Type`                            |

## Description

The `Content-Type` header in the request specifies a media type that the endpoint does not support. Most JSON endpoints require `application/json`; endpoint-specific media types are listed in the API reference.

## Response Example

```json
{
  "type": "https://docs.kordiam.app/docs/errors/unsupported-media-type",
  "title": "Unsupported Media Type",
  "status": 415,
  "detail": "Content-Type 'text/plain' is not supported",
  "instance": "/api/v2/elements",
  "traceId": "abc-123-def",
  "supportedMediaTypes": ["application/json"]
}
```

## Common Causes

- Missing the `Content-Type` header on a request that includes a body
- Using `Content-Type: text/plain` instead of `application/json`
- Using a media type that is not documented for the endpoint

## How to Fix

Set the `Content-Type` header to the media type documented for the endpoint. For JSON endpoints:

```
Content-Type: application/json
```
