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

# Create a knowledge base

> Create an empty knowledge base under one of your accounts. Name the account by its accountId + instance pair — the pair, not accountId alone, identifies an account. Knowledge-base reach follows the accounts provisioned to your tenants, carried in the token, NOT your CloudChat memberships: discover the pairs you can create under with an unfiltered listMyKnowledgeBases, where every row carries them. An account that holds no knowledge base yet does not appear there; take its pair from listMyCloudChatAccounts then, knowing that listing is CloudChat membership and an account from it may still be refused here with 403 — nothing is created when that happens. The new base starts with no entries and is not linked to any project; add content with createEntry or importEntries, or configure a crawl with upsertContentSource.



## OpenAPI

````yaml /api-reference/specs/claudia/v1.json post /v1/knowledge-bases
openapi: 3.0.1
info:
  title: Claudia API
  version: 1.0.0
servers:
  - url: https://api.cloudhumans.com/claudia
    description: Production
  - url: https://api.cloudhumans.com/claudia/staging
    description: Staging
security:
  - bearerAuth: []
tags:
  - name: MCP Servers
    description: >-
      The MCP servers your agents can call tools on. Registering one here is
      what makes its tools selectable in an agent; the credentials it needs are
      stored encrypted and never read back.
  - name: Knowledge Base Content
    description: Read, search and edit the content that answers your customers.
  - name: Content Quality
    description: Rewrites proposed for content that is answering your customers badly.
  - name: Playground
    description: >-
      Talk to one of your agents as if you were a customer, without touching a
      real conversation.
  - name: Project Settings
    description: >-
      Read and change how a ClaudIA project behaves — the settings screens of
      the ClaudIA app, as an API.
  - name: Content Improvements
    description: Answers Claudia proposes for questions your content does not cover yet.
  - name: Knowledge Bases
    description: The knowledge bases your account can manage.
  - name: Content Sources
    description: The sites Claudia crawls to keep a knowledge base in sync.
  - name: Agents
    description: >-
      The AI agents (assistants) configured for your tenant: the orchestrator
      (supervisor) and its specialists (react). Reads answer the same
      passthrough shape the platform stores; creates land as DRAFTS a human
      reviews and publishes in the app.
  - name: Agent Tools
    description: >-
      The tool catalog your agents can be given, aggregated across every MCP
      server registered for the tenant. This is the same catalog an assistant's
      mcp_servers[].tools whitelist is validated against.
  - name: Conversations
    description: >-
      Read access to a conversation's lean investigation summary — messages,
      status and resolution — and the execution trace behind one of its
      processed messages, without the internal processing state the hub UI's
      full read carries.
paths:
  /v1/knowledge-bases:
    post:
      tags:
        - Knowledge Bases
      summary: Create a knowledge base
      description: >-
        Create an empty knowledge base under one of your accounts. Name the
        account by its accountId + instance pair — the pair, not accountId
        alone, identifies an account. Knowledge-base reach follows the accounts
        provisioned to your tenants, carried in the token, NOT your CloudChat
        memberships: discover the pairs you can create under with an unfiltered
        listMyKnowledgeBases, where every row carries them. An account that
        holds no knowledge base yet does not appear there; take its pair from
        listMyCloudChatAccounts then, knowing that listing is CloudChat
        membership and an account from it may still be refused here with 403 —
        nothing is created when that happens. The new base starts with no
        entries and is not linked to any project; add content with createEntry
        or importEntries, or configure a crawl with upsertContentSource.
      operationId: createKnowledgeBase
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KnowledgeBaseCreate'
        required: true
      responses:
        '201':
          description: >-
            The knowledge base as created. Its id is what every content endpoint
            takes.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KnowledgeBase'
        '400':
          description: accountId, instance or name is missing or blank.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing, expired or invalid credentials.
        '403':
          description: >-
            The named account is not provisioned to your tenants. Nothing was
            created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit applied by the API gateway. Back off and retry.
components:
  schemas:
    KnowledgeBaseCreate:
      required:
        - accountId
        - instance
        - name
      type: object
      properties:
        accountId:
          type: string
          description: >-
            Account the knowledge base belongs to, e.g. `7`. Not an account on
            its own: accountId is only unique within an instance, so always send
            instance with it — the pair is what names the account. The account
            must be provisioned to your tenants — the reach an unfiltered
            listMyKnowledgeBases shows — not merely a CloudChat membership: an
            account outside that reach is refused with 403 and nothing is
            created.
        instance:
          type: string
          description: >-
            CloudChat instance the account lives in, e.g. `4`. Together with
            accountId it names exactly one account, which accountId alone does
            not. Take the pair from a listMyKnowledgeBases row, or from
            listMyCloudChatAccounts for an account that holds no knowledge base
            yet.
        name:
          type: string
          description: >-
            Display name, as shown in the knowledge base list. Must not be
            blank.
          example: Support FAQ
      description: The knowledge base to create.
    KnowledgeBase:
      required:
        - accountId
        - createdAt
        - instance
        - name
        - updatedAt
      type: object
      properties:
        id:
          type: string
          description: Use this id in the content endpoints.
          example: 6683f1c2a4b19e0012ab34cd
        name:
          type: string
          description: Display name.
          example: Support FAQ
        accountId:
          type: string
          description: >-
            Account this knowledge base belongs to, e.g. `7`. Only unique within
            `instance`: read the two together — the pair is what identifies the
            account, and accountId on its own does not.
        instance:
          type: string
          description: >-
            CloudChat instance the account lives in, e.g. `4`. With `accountId`
            it forms the pair that identifies this row's account, which is what
            tells rows apart when one listing spans several accounts.
        createdAt:
          type: string
          description: When it was created (ISO-8601).
          example: '2026-08-10T14:32:05'
        updatedAt:
          type: string
          description: When it last changed (ISO-8601).
          example: '2026-08-10T18:20:41'
      description: A knowledge base you can manage.
    Error:
      required:
        - error
      type: object
      properties:
        error:
          type: string
          description: What went wrong.
          example: 'Forbidden: token holds no claim for the requested account'
      description: Something the caller needs to fix.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````