> ## 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 or the folders that organize them, or read the full content of one source. This does not cover the brand kit, which is a separate resource.

**Example:** "What knowledge sources have I uploaded?"

**Usage:** pick what you want with `view`: `list` for the sources, `folders` for the folders (id and name, handy for turning a folder name into its id), or `content` for one source's parsed text (needs the source id). When listing you can narrow by folder, by origin (web url, website, file, or document), by sync status, by workflow status, by tag, or by a text search over the title or filename, and page through the results with a cursor and a limit.

**Response:** for list, the matching sources with their status and details. For folders, each folder's id and name. For content, the parsed text of the source.



## 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 or the folders that organize them,
        or read the full content of one source. This does not cover the brand
        kit, which is a separate resource.


        **Example:** "What knowledge sources have I uploaded?"


        **Usage:** pick what you want with `view`: `list` for the sources,
        `folders` for the folders (id and name, handy for turning a folder name
        into its id), or `content` for one source's parsed text (needs the
        source id). When listing you can narrow by folder, by origin (web url,
        website, file, or document), by sync status, by workflow status, by tag,
        or by a text search over the title or filename, and page through the
        results with a cursor and a limit.


        **Response:** for list, the matching sources with their status and
        details. For folders, each folder's id and name. For content, the parsed
        text of the source.
      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

````