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

# Create Text Document

> Create a knowledge base document containing the provided text.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/convai/knowledge-base/text
openapi: 3.1.0
info:
  title: Threetone API Documentation
  description: >-
    This is the documentation for the Threetone API. You can use this API to use
    our service programmatically with API keys sent in the x-api-key header. You
    can create and manage API keys in the dashboard at
    https://threetone.in/app/developers/api-keys.
  version: '1.0'
servers:
  - url: https://api.threetone.in
    description: Production
security: []
paths:
  /v1/convai/knowledge-base/text:
    post:
      tags:
        - Agents Platform
      summary: Create Text Document
      description: Create a knowledge base document containing the provided text.
      operationId: create_text_document_route
      parameters:
        - name: x-api-key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Your API key for programmatic access. Send it in the x-api-key
              header; you can create and manage keys from the Developers page.
            title: X-Api-Key
          description: >-
            Your API key for programmatic access. Send it in the x-api-key
            header; you can create and manage keys from the Developers page.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Body_create_text_document_route'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddKnowledgeBaseResponseModel'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    Body_create_text_document_route:
      properties:
        text:
          type: string
          title: Text
          description: Text content to be added to the knowledge base.
        name:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
          title: Name
          description: A custom, human-readable name for the document.
        parent_folder_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Parent Folder Id
          description: >-
            If set, the created document or folder will be placed inside the
            given folder.
      type: object
      required:
        - text
      title: Body_create_text_document_route
    AddKnowledgeBaseResponseModel:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        folder_path:
          items:
            $ref: >-
              #/components/schemas/KnowledgeBaseFolderPathSegmentSummaryResponseModel
          type: array
          title: Folder Path
          description: >-
            The folder path segments leading to this entity, from root to parent
            folder.
      type: object
      required:
        - id
        - name
      title: AddKnowledgeBaseResponseModel
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    KnowledgeBaseFolderPathSegmentSummaryResponseModel:
      properties:
        id:
          type: string
          title: Id
      type: object
      required:
        - id
      title: KnowledgeBaseFolderPathSegmentSummaryResponseModel
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````