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

# Create knowledgebase

> Create a knowledgebase. On validation failure the handler currently responds with 500.



## OpenAPI

````yaml https://api.pathors.com/openapi.json post /v1/projects/{projectId}/knowledgebases
openapi: 3.1.0
info:
  title: Pathors API
  description: >-
    Public developer API for the Pathors platform. Authenticate with a developer
    key (`Authorization: Bearer dk_...`) created from the dashboard. See
    [docs.pathors.com](https://docs.pathors.com) for guides.
  version: 1.0.0
  contact:
    name: Pathors Support
    url: https://app.pathors.com/support
servers:
  - url: https://api.pathors.com
    description: Production
  - url: http://localhost:8080
    description: Local development
security:
  - developerKey: []
tags:
  - name: Projects
    description: CRUD for projects owned by the authenticated developer
  - name: Agent Config
    description: Read and update a project's agent configuration and versions
  - name: Pathway
    description: Manage a project's pathway graph — nodes and decision edges
  - name: Chat
    description: OpenAI-compatible chat completions for a project agent
  - name: Sessions
    description: Create, search, terminate, and inspect agent sessions
  - name: Session History
    description: Browse and inspect persisted session history
  - name: Tools
    description: Manage a project's tools and inspect available tool types
  - name: Knowledgebases
    description: Manage knowledgebases and query them for relevant chunks
  - name: Datasets
    description: Upload and manage source files embedded into a knowledgebase
  - name: Test Cases
    description: CRUD for agent test cases
  - name: Test Suites
    description: Group test cases, run them, and read results
  - name: Webhooks
    description: Manage webhook subscriptions for project events
  - name: Calls
    description: Place outbound voice calls from a project agent
paths:
  /v1/projects/{projectId}/knowledgebases:
    post:
      tags:
        - Knowledgebases
      summary: Create knowledgebase
      description: >-
        Create a knowledgebase. On validation failure the handler currently
        responds with 500.
      operationId: postV1ProjectsByProjectIdKnowledgebases
      parameters:
        - name: projectId
          in: path
          required: true
          schema:
            type: string
          description: The ID of your project
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $schema: https://json-schema.org/draft/2020-12/schema
              type: object
              properties:
                id:
                  type: string
                name:
                  type: string
                  minLength: 1
                  maxLength: 200
                type:
                  default: pinecone
                  type: string
                  enum:
                    - pgvector
                    - pinecone
                embeddingModelName:
                  default: llama-text-embed-v2
                  type: string
                  enum:
                    - text-embedding-ada-002
                    - text-embedding-3-small
                    - text-embedding-3-large
                    - embed-v4.0
                    - embed-english-v3.0
                    - embed-multilingual-v3.0
                    - embed-english-light-v3.0
                    - embed-multilingual-light-v3.0
                    - llama-text-embed-v2
                chunkSize:
                  default: 2000
                  type: number
                  minimum: 50
                chunkOverlap:
                  default: 200
                  type: number
                  minimum: 0
              required:
                - name
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
        '401':
          description: Error response
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    properties:
                      error:
                        type: string
                    required:
                      - error
                  - type: object
                    properties:
                      error:
                        type: object
                        properties:
                          message:
                            type: string
                          code:
                            type: string
                          details:
                            type: object
                            propertyNames:
                              type: string
                            additionalProperties: {}
                        required:
                          - message
                    required:
                      - error
        '500':
          description: Error response
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    properties:
                      error:
                        type: string
                    required:
                      - error
                  - type: object
                    properties:
                      error:
                        type: object
                        properties:
                          message:
                            type: string
                          code:
                            type: string
                          details:
                            type: object
                            propertyNames:
                              type: string
                            additionalProperties: {}
                        required:
                          - message
                    required:
                      - error
components:
  securitySchemes:
    developerKey:
      type: http
      scheme: bearer
      bearerFormat: Developer key (dk_...)
      description: Developer key created from the dashboard (Settings → Developer Keys)

````