> ## 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 text knowledge to knowledge base



## OpenAPI

````yaml post /knowledge-base/save-text
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-text:
    post:
      tags:
        - Knowledge Base
      summary: Save text knowledge to knowledge base
      operationId: KnowledgeBaseController_saveTextKnowledge
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateKnowledgeBaseDto'
      responses:
        '201':
          description: Text knowledge saved successfully
        '400':
          description: Invalid data
      security:
        - apiKey: []
components:
  schemas:
    CreateKnowledgeBaseDto:
      type: object
      properties:
        name:
          type: string
          example: AI Basics
          description: Name of the knowledge base
        type:
          type: string
          example: text
          description: Type of knowledge base (text or file)
        text:
          type: string
          example: This is the text content for the knowledge base
          description: Text content for text-based knowledge
        description:
          type: string
          example: Here is the description of the knowledge base
          description: Description of the knowledge base
      required:
        - name
        - type
        - text
        - description
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: API Key for authentication

````