> ## 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

> Lists the project's knowledge sources or the folders that organize them, or reads the full content of one source. This does not cover the brand kit, which is a separate resource at `POST /brand-kit`.

**Example:** List a project's knowledge sources, or read the parsed text of one source.

**Usage:** Set `view` to `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.agents.writesonic.com/openapi.json post /api/v1/business/knowledge/sources
openapi: 3.1.0
info:
  title: 'hq-backend: Business API'
  description: Public Business API endpoints, authenticated with an API key.
  version: 0.1.0
servers:
  - url: https://api.agents.writesonic.com
security: []
paths:
  /api/v1/business/knowledge/sources:
    post:
      tags:
        - business
      summary: List or read knowledge sources
      description: >-
        Lists the project's knowledge sources or the folders that organize them,
        or reads the full content of one source. This does not cover the brand
        kit, which is a separate resource at `POST /brand-kit`.


        **Example:** List a project's knowledge sources, or read the parsed text
        of one source.


        **Usage:** Set `view` to `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
      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'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    KnowledgeSourceArgs:
      properties:
        view:
          $ref: '#/components/schemas/KnowledgeSourceView'
          description: >-
            view: list enumerates sources; content fetches one source's text.
            One of: list, content, folders.
        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 on title/filename for the list view. Matches only
            sources outside folders unless folder_id is set; for a named source
            that may be in a folder, check each folder from view='folders', or
            use search_knowledge, whose hits carry source ids.
        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
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      description: Writesonic API key
      in: header
      name: X-API-Key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.