Skip to content

Unsupported Media Type

URI: https://docs.ankatech.co/errors/unsupported-media-type
HTTP Status: 415 Unsupported Media Type

When you see this

The server refused your request because the Content-Type of the body is not one the endpoint can process.

Common Causes

  • Sending a body without a Content-Type header, or with the wrong one.
  • Posting text/plain or application/x-www-form-urlencoded where application/json is required.
  • Uploading a keystore or file with a media type the endpoint does not accept.
  • A proxy or client library overriding the Content-Type you intended to send.

Response Example

{
  "type": "https://docs.ankatech.co/errors/unsupported-media-type",
  "title": "Unsupported Media Type",
  "status": 415,
  "detail": "Content type 'text/plain' is not supported. Expected one of: application/json.",
  "instance": "/api/v3/crypto/encrypt",
  "correlationId": "550e8400-e29b-41d4-a716-446655440000",
  "timestamp": 1730000000
}

Content-Type: application/problem+json — the response follows RFC 7807 Problem Details.

How to Resolve

  1. Set the Content-Type header to the media type the endpoint expects (most JSON endpoints require application/json).
  2. For file or keystore uploads, use the multipart or binary media type documented for that endpoint.
  3. Verify the accepted media types in the Developer Hub Reference and re-submit.

For full schema definitions, examples, and interactive testing, see the Developer Hub Reference.