Get supported file types

GET /v1/knowledge-base/file-types

Returns a list of all supported file types and MIME types for knowledge base entries. This endpoint provides information about which file formats can be uploaded to the knowledge base, organized by media type (documents, images, audio, video, etc.). Each file type includes the supported MIME types, file extensions, and support level (production or preview). This information can be used by client applications to validate file uploads and provide appropriate user interface elements.

Headers

  • X-API-Version string

    Default value is 2025-03-25.

Responses

  • 200 application/json

    Supported file types returned successfully.

    Hide response attributes Show response attributes object
    • success boolean Required

      Indicates if the request was successful

    • mediaGroups array[object] Required

      List of supported media groups with their file types

      Hide mediaGroups attributes Show mediaGroups attributes object
      • label string Required

        Human-readable label for this media group

      • mediaType string Required

        Type of media this group represents

        Values are document, data, image, audio, video, or ebook.

      • limitation string

        Optional limitation or constraint for this media group

      • fileTypes array[object] Required

        List of supported file types in this media group

        Hide fileTypes attributes Show fileTypes attributes object
        • mimeTypes array[string] Required

          Supported MIME types for this file type

        • extensions array[string] Required

          Supported file extensions for this file type

        • supportLevel string Required

          Support level for this file type

          Values are production, preview, or disabled.

  • 400 application/json

    Bad Request

    Hide response attributes Show response attributes object
    • success boolean Required

      Indicates the status of the request

    • error string Required

      A text representation of the error

    • fingerprint string

      A unique identifier of the event, useful for reporting

    • request_id string Required

      A unique identifier of the request, useful for reporting

  • 401 application/json

    Unauthorized

    Hide response attributes Show response attributes object
    • success boolean Required

      Indicates the status of the request

    • error string Required

      A text representation of the error

    • fingerprint string

      A unique identifier of the event, useful for reporting

    • request_id string Required

      A unique identifier of the request, useful for reporting

  • 404 application/json

    Not Found

    Hide response attributes Show response attributes object
    • success boolean Required

      Indicates the status of the request

    • error string Required

      A text representation of the error

    • request_id string Required

      A unique identifier of the request, useful for reporting

  • 415 application/json

    Unsupported Media Type

    Hide response attributes Show response attributes object
    • success boolean Required

      Indicates the status of the request

    • error string Required

      A text representation of the error

    • fingerprint string

      A unique identifier of the event, useful for reporting

    • request_id string Required

      A unique identifier of the request, useful for reporting

  • 500 application/json

    Internal Server Error

    Hide response attributes Show response attributes object
    • success boolean Required

      Indicates the status of the request

    • error string Required

      A text representation of the error

    • fingerprint string

      A unique identifier of the event, useful for reporting

    • request_id string Required

      A unique identifier of the request, useful for reporting

    • inner_exception object

      The inner exception

      Hide inner_exception attributes Show inner_exception attributes object
      • name string Required
      • message string Required
      • cause string
      • stack string
GET /v1/knowledge-base/file-types
curl \
 --request GET 'https://api.sensay.io/v1/knowledge-base/file-types' \
 --header "X-ORGANIZATION-SECRET: $API_KEY" \
 --header "X-API-Version: 2025-03-25"
Response examples (200)
{
  "success": true,
  "mediaGroups": [
    {
      "label": "PDF Documents",
      "mediaType": "document",
      "limitation": "Maximum duration: 90 minutes",
      "fileTypes": [
        {
          "mimeTypes": [
            "application/pdf"
          ],
          "extensions": [
            ".pdf",
            ".pdfa"
          ],
          "supportLevel": "production"
        }
      ]
    }
  ]
}
Response examples (400)
{
  "error": "A text representation of the error",
  "success": false,
  "request_id": "xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab",
  "fingerprint": "14fceadd84e74ec499afe9b0f7952d6b"
}
Response examples (401)
{
  "error": "A text representation of the error",
  "success": false,
  "request_id": "xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab",
  "fingerprint": "14fceadd84e74ec499afe9b0f7952d6b"
}
Response examples (404)
{
  "error": "A text representation of the error",
  "success": false,
  "request_id": "xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"
}
Response examples (415)
{
  "error": "A text representation of the error",
  "success": false,
  "request_id": "xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab",
  "fingerprint": "14fceadd84e74ec499afe9b0f7952d6b"
}
Response examples (500)
{
  "error": "A text representation of the error",
  "success": false,
  "request_id": "xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab",
  "fingerprint": "14fceadd84e74ec499afe9b0f7952d6b",
  "inner_exception": {
    "name": "Server overheated",
    "cause": "Request too complicated",
    "stack": "Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>...",
    "message": "The server overheated due to an unexpected situation"
  }
}