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

# List or read knowledge sources

> List the project's knowledge sources, list its folders, or fetch one source's content (kih-hub). Does NOT cover the Brand Kit — that is a separate resource, fetched with get_brand_kit, not a knowledge source you list/read here.

view=list enumerates sources (filter with folder_id/type/status/q, paginate with cursor/limit); view=folders lists the project's knowledge folders (id + name) — use it to resolve a folder NAME to its folder_id before filtering or ingesting into that folder; view=content returns the parsed text of one source (needs source_id).



## OpenAPI

````yaml https://mcp.agent.writesonic.com/openapi.json post /api/v1/business/knowledge/sources
openapi: 3.1.0
info:
  title: hq-backend — Business API
  description: Public business tool endpoints (API-key auth).
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/business/knowledge/sources:
    post:
      tags:
        - business
      summary: List or read knowledge sources
      description: >-
        List the project's knowledge sources, list its folders, or fetch one
        source's content (kih-hub). Does NOT cover the Brand Kit — that is a
        separate resource, fetched with get_brand_kit, not a knowledge source
        you list/read here.


        view=list enumerates sources (filter with folder_id/type/status/q,
        paginate with cursor/limit); view=folders lists the project's knowledge
        folders (id + name) — use it to resolve a folder NAME to its folder_id
        before filtering or ingesting into that folder; view=content returns the
        parsed text of one source (needs source_id).
      operationId: get_knowledge_source_api_v1_business_knowledge_sources_post
      parameters:
        - name: x-project-id
          in: header
          required: true
          schema:
            type: string
            format: uuid
            description: Project ID for tenant scoping
            title: X-Project-Id
          description: Project ID for tenant scoping
        - name: X-Workspace-Id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            description: Overrides the key's workspace
            title: X-Workspace-Id
          description: Overrides the key's workspace
        - name: X-API-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: User API key
            title: X-Api-Key
          description: User API key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KnowledgeSourceArgs'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    KnowledgeSourceArgs:
      properties:
        view:
          $ref: '#/components/schemas/KnowledgeSourceView'
          description: list enumerates sources; content fetches one source's text
        source_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Source Id
          description: Source id; required for the content view
        folder_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Folder Id
          description: >-
            Filter the list to a folder; resolve a folder name to its id via
            view='folders'
        type:
          anyOf:
            - $ref: '#/components/schemas/SourceType'
            - type: 'null'
          description: >-
            Filter the list by source origin (WEB_URL, WEBSITE, FILE, DOCUMENT)
            — not a file format like pdf/txt; there is no file-format filter,
            use `q` for a filename substring instead.
        status:
          anyOf:
            - $ref: '#/components/schemas/SourceStatus'
            - type: 'null'
          description: >-
            Filter the list by sync status (QUEUED, SYNCING, SYNCED,
            SYNC_FAILED).
        workflow_status:
          anyOf:
            - $ref: '#/components/schemas/WorkflowStatus'
            - type: 'null'
          description: >-
            Filter the list by workflow status (DRAFT, IN_REVIEW, APPROVED,
            ARCHIVED).
        tag_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Tag Id
          description: Filter the list to a tag
        q:
          anyOf:
            - type: string
            - type: 'null'
          title: Q
          description: >-
            Substring filter for the list view, matched against source
            title/filename — a single call already returns the definitive match
            set, no follow-up full listing needed.
        cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Cursor
          description: Pagination cursor for the list view
        limit:
          anyOf:
            - type: integer
            - type: 'null'
          title: Limit
          description: Max sources to return in the list view
      type: object
      required:
        - view
      title: KnowledgeSourceArgs
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    KnowledgeSourceView:
      type: string
      enum:
        - list
        - content
        - folders
      title: KnowledgeSourceView
    SourceType:
      type: string
      enum:
        - WEB_URL
        - WEBSITE
        - FILE
        - DOCUMENT
      title: SourceType
    SourceStatus:
      type: string
      enum:
        - QUEUED
        - SYNCING
        - SYNCED
        - SYNC_FAILED
      title: SourceStatus
    WorkflowStatus:
      type: string
      enum:
        - DRAFT
        - IN_REVIEW
        - APPROVED
        - ARCHIVED
      title: WorkflowStatus
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````