# unsupported-media-type

> The Content-Type is not accepted by this endpoint.

`415 Unsupported Media Type` · `Unsupported media type` · `type: https://docs.dlogify.com/errors/unsupported-media-type`

## When it happens

- `POST /v1/logs` received a `Content-Type` other than `application/x-protobuf` or `application/json`.
- `POST /v1/ingest` received a body that is not `application/json`.

## How to fix it

Set `Content-Type: application/json` for `POST /v1/ingest`, and `application/x-protobuf` or `application/json` for OTLP/HTTP.

## Example

```http
HTTP/1.1 415 Unsupported Media Type
Content-Type: application/problem+json
```

```json
{
  "type": "https://docs.dlogify.com/errors/unsupported-media-type",
  "title": "Unsupported media type",
  "status": 415,
  "detail": "Content-Type \"text/plain\" is not supported; use application/x-protobuf or application/json.",
  "instance": "req_01j…"
}
```

Source: https://docs.dlogify.com/errors/unsupported-media-type
