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

# Create knowledgeSource



## OpenAPI

````yaml https://dev.enneo.dev/api/mind/docs/open-api post /knowledgeSource
openapi: 3.0.0
info:
  version: '1'
  title: enneo.MIND API
  description: This describes the API of enneo Mind, the main ticketing backend
  contact:
    name: enneo GmbH
    email: richard@enneo.ai
  license:
    name: Proprietary software
    url: https://enneo.ai
servers:
  - url: https://demo.enneo.ai/api/mind
    description: Production server, demo client
  - url: https://main.enneo.dev/api/mind
    description: Development main branch
  - url: http://localhost:8005/api/mind
    description: Local development server
security:
  - bearerAuth:
      - api
  - cookieAuth:
      - api
paths:
  /knowledgeSource:
    post:
      tags:
        - Wiki knowledge source
      summary: Create knowledgeSource
      operationId: createKnowledgeSource
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KnowledgeSource'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Success'
                  - $ref: '#/components/schemas/KnowledgeSource'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    KnowledgeSource:
      type: object
      description: Knowledge source object
      properties:
        id:
          type: integer
          description: Internal id, e.g. 123
          nullable: false
          example: 123
        type:
          type: string
          description: Type of knowledge source
          enum:
            - faq
            - work-instruction
            - document
            - other
            - news
            - website
          default: faq
        status:
          type: string
          description: Status of the knowledge source
          enum:
            - active
            - archived
            - deleted
          default: active
          example: active
        source:
          type: string
          description: >-
            URL to associated source. null for sources with internal ids
            (tickets and templates) or if non-existant (language model source)
          example: https://company.com/faq/376189
          nullable: false
          default: ''
        name:
          type: string
          description: >-
            Name of knowledge source, any requests with existing name will
            update the existing knowledge source
          example: Opening hours
          nullable: false
        tags:
          type: array
          items:
            type: integer
          description: Tags that are assigned to this knowledge source
          example:
            - 70
            - 71
          nullable: true
        teams:
          type: array
          items:
            type: integer
          description: >-
            Teams that restrict access to this knowledge source. When set, only
            agents whose active team memberships intersect this list can see the
            article. Applies to all types. An empty array (or omitting the
            field) means no restriction — all agents see it. On update, sending
            `teams` replaces the full set; omitting `teams` leaves the existing
            set unchanged.
          example:
            - 1
            - 2
        readByAgents:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
                example: 1
              name:
                type: string
                example: John Doe
              readAt:
                type: string
                format: DateTime
                example: '2024-11-29 14:38:12'
          description: Agents that have read the knowledge source
          example:
            - id: 1
              name: John Doe
              readAt: '2024-11-29 14:38:12'
          readOnly: true
        title:
          type: string
          description: Title of knowledge source
          example: Opening hours
          nullable: true
        text:
          type: string
          description: Full text that was used as source
          example: >-
            Our service hours are from 8am to 5pm. We are closed on weekends.
            [...]
          nullable: false
        confidential:
          type: boolean
          description: If true, then this knowledge source is only visible to agents
          example: false
          nullable: false
          default: false
        excluded:
          type: boolean
          description: >
            For website-type pages only — true if the page URL matches the
            parent connector's

            sourceConfig.excludePaths. Excluded pages are filtered out of `GET
            /knowledgeSource`

            (bulk list) and return 404 from `GET /knowledgeSource/{id}` so
            Cortex sync stays consistent.

            The configuration view (which calls
            `/knowledgeSourceStructure?withExcluded=true`)

            sees them with this flag set so it can render the "Excluded" tag and
            the Include action.
          default: false
        access:
          $ref: '#/components/schemas/KnowledgeSourceAccess'
    Success:
      type: object
      description: Data format of Enneo success messages
      properties:
        success:
          type: boolean
          example: true
          description: Operation was successful
    Error:
      type: object
      description: Data format of Enneo error messages
      properties:
        error:
          type: string
          example: Contract 121 could not be processed
          description: Readable error message that should be shown to the user
        details:
          type: string
          example: >-
            Uncatched null point exception in testFunction() in
            /app/src/file:212
          description: Not easily readable error message that is for the developer
        txId:
          type: string
          example: c916167c94
          description: >-
            Internal transaction id. Useful for debugging. Corresponds to the
            OpenTelemetry trace ID.
    KnowledgeSourceAccess:
      type: object
      description: >
        Team-ACL "access hole" indicator. Present only when this node has a
        problem or contains one;

        omitted entirely when the node is clean. A hole = the node declares
        team(s) that an ancestor

        folder forbids — because visibility is narrowing-only (reachable only by
        users who pass every

        restricted ancestor AND the node's own restriction), the access the
        editor granted does not

        actually work. To learn what is wrong, open the item and read its real
        `teams`.
      properties:
        blocked:
          type: boolean
          description: >
            True when THIS node's own teams are partly or fully cut by an
            ancestor folder. Present only

            when true (omitted otherwise).
          example: true
        blockedItems:
          type: array
          description: >
            Direct children that are blocked or contain a blocked descendant — a
            one-level breadcrumb:

            follow it down to the next level until you reach the node with
            `blocked: true`. Present only

            when non-empty. Detection is user-independent, so a problem hidden
            from the caller by ACL

            still surfaces here as `{id, kind}` (only id/kind leak — never the
            gated content).
          items:
            type: object
            properties:
              id:
                type: integer
                example: 42
              kind:
                type: string
                enum:
                  - folder
                  - article
                example: article
          example:
            - id: 42
              kind: article
            - id: 57
              kind: folder
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT-based authentication
      x-scopes:
        api: Full access to the API
    cookieAuth:
      type: apiKey
      in: cookie
      name: connect.sid
      description: Cookie-based authentication
      x-scopes:
        api: Full access to the API

````