> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cleartalk.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Save file to knowledge base



## OpenAPI

````yaml post /knowledge-base/save-file
openapi: 3.0.0
info:
  title: ClearTalk API
  description: The ClearTalk API Documentation
  version: '1.0'
  contact:
    name: Developer Support
    email: devsupport@cleartalk.ai
servers:
  - url: https://api.cleartalk.ai
    description: ClearTalk AI API Server
security: []
tags: []
paths:
  /knowledge-base/save-file:
    post:
      tags:
        - Knowledge Base
      summary: Save file to knowledge base
      operationId: KnowledgeBaseController_saveFileKnowledge
      parameters: []
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/CreateKnowledgeBaseFileDto'
      responses:
        '201':
          description: File saved successfully
        '400':
          description: Invalid file or data
        '413':
          description: File too large
      security:
        - apiKey: []
components:
  schemas:
    CreateKnowledgeBaseFileDto:
      type: object
      properties:
        type:
          type: string
          description: Type of knowledge base
          example: file
        name:
          type: string
          description: Name of the knowledge base
          example: My Document
        description:
          type: string
          description: Description of the knowledge base
          example: This is a sample document
        file:
          type: string
          format: binary
          description: File to upload
      required:
        - type
        - name
        - file
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: API Key for authentication

````