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

# List Knowledge Base files

> Lists your organization's Knowledge Base files, oldest first.

**Each file includes**
- Its name and type
- Its collection, and the path of folders it's in
- Who added it and when
- Its size in Knowledge Base pages

Filter by collection, folder, file type, or the person who added the file. Page through results with `cursor`.

Requires the Knowledge Base permission (`knowledge_base:read`).



## OpenAPI

````yaml /admin-api-openapi.json get /knowledge-base/files
openapi: 3.1.1
info:
  title: Cassidy Admin API
  description: Read your organization's usage analytics and activity in Cassidy.
  version: 1.0.0
servers:
  - url: https://app.cassidyai.com/api/admin/v1
security: []
tags:
  - name: Analytics
    description: >-
      Usage totals over time, or broken down by user, group, Agent, Workflow,
      source, or plugin.
  - name: Workflow runs
    description: Individual Workflow runs, with who started them and their status.
  - name: Chats
    description: Agent chats, with who started them and the Agent they used.
  - name: Meetings
    description: >-
      Meetings recorded by the Cassidy notetaker, with their owners and
      participants.
  - name: Knowledge Base
    description: Knowledge Base collections, folders, and files.
  - name: Users
    description: Your organization's members, with their roles and groups.
  - name: Groups
    description: Your organization's groups.
  - name: Audit logs
    description: Audit log events for activity in your organization.
externalDocs:
  url: https://docs.cassidyai.com/reference/admin-api
paths:
  /knowledge-base/files:
    get:
      tags:
        - Knowledge Base
      summary: List Knowledge Base files
      description: >-
        Lists your organization's Knowledge Base files, oldest first.


        **Each file includes**

        - Its name and type

        - Its collection, and the path of folders it's in

        - Who added it and when

        - Its size in Knowledge Base pages


        Filter by collection, folder, file type, or the person who added the
        file. Page through results with `cursor`.


        Requires the Knowledge Base permission (`knowledge_base:read`).
      operationId: listKnowledgeBaseFiles
      parameters:
        - in: query
          name: limit
          schema:
            description: Maximum number of records to return.
            default: 100
            type: integer
            minimum: 1
            maximum: 1000
          description: Maximum number of records to return.
        - in: query
          name: cursor
          schema:
            description: The `nextCursor` from the previous page.
            type: string
          description: The `nextCursor` from the previous page.
        - in: query
          name: collectionId
          schema:
            description: >-
              Only list files in this collection. Use `general` for General
              Knowledge.
            type: string
          description: >-
            Only list files in this collection. Use `general` for General
            Knowledge.
        - in: query
          name: folderId
          schema:
            description: Only list files in this folder, including its subfolders.
            type: string
          description: Only list files in this folder, including its subfolders.
        - in: query
          name: userId
          schema:
            description: Only list files this user added.
            type: string
          description: Only list files this user added.
        - in: query
          name: types
          schema:
            description: Only list files of these types, as a comma-separated list.
            minItems: 1
            type: array
            items:
              type: string
              enum:
                - document
                - integration
                - pdf
                - doc
                - docx
                - pptx
                - keynote
                - xls
                - xlsx
                - csv
                - code
                - otherFile
                - meetingTranscript
                - webpage
                - confluencePage
                - googleDriveFile
                - boxFile
                - sharePointFile
                - sharePointList
                - sharePointSitePage
                - oneDriveFile
                - slackChannel
                - notionPage
                - jiraIssue
                - youtubeTranscript
                - answerHubArticle
                - zendeskArticle
                - serviceNowCatalogItem
                - serviceNowKnowledgeArticle
                - gongCall
                - codaPage
                - markdown
                - mp3
                - wav
                - mp4
                - aac
                - flac
                - m4v
                - m4a
                - mov
                - png
                - webp
                - jpeg
                - gif
          description: Only list files of these types, as a comma-separated list.
          style: form
          explode: false
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  nextCursor:
                    description: >-
                      Pass as `cursor` to get the next page. Null on the last
                      page.
                    type:
                      - string
                      - 'null'
                  files:
                    type: array
                    items:
                      $ref: '#/components/schemas/KnowledgeBaseFile'
                required:
                  - nextCursor
                  - files
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.NOT_FOUND'
        '429':
          description: Too many requests
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              required: true
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.TOO_MANY_REQUESTS'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
      security:
        - bearerAuth:
            - knowledge_base:read
components:
  schemas:
    KnowledgeBaseFile:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        type:
          type: string
          enum:
            - document
            - integration
            - pdf
            - doc
            - docx
            - pptx
            - keynote
            - xls
            - xlsx
            - csv
            - code
            - otherFile
            - meetingTranscript
            - webpage
            - confluencePage
            - googleDriveFile
            - boxFile
            - sharePointFile
            - sharePointList
            - sharePointSitePage
            - oneDriveFile
            - slackChannel
            - notionPage
            - jiraIssue
            - youtubeTranscript
            - answerHubArticle
            - zendeskArticle
            - serviceNowCatalogItem
            - serviceNowKnowledgeArticle
            - gongCall
            - codaPage
            - markdown
            - mp3
            - wav
            - mp4
            - aac
            - flac
            - m4v
            - m4a
            - mov
            - png
            - webp
            - jpeg
            - gif
        createdAt:
          type: string
          description: When the file was added.
        updatedAt:
          type: string
        createdBy:
          $ref: '#/components/schemas/User'
          description: The person who added the file.
        collection:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
          required:
            - id
            - name
          description: >-
            The collection the file is in. General Knowledge has the ID
            `general`.
        folder:
          anyOf:
            - type: object
              properties:
                id:
                  type: string
                name:
                  type: string
                path:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                    required:
                      - id
                      - name
                  description: >-
                    The folders from the top of the collection down to and
                    including this one.
              required:
                - id
                - name
                - path
            - type: 'null'
          description: >-
            The folder the file is in. Null for files at the top of a
            collection.
        pages:
          type: number
          description: >-
            The file's size in Knowledge Base pages. Files whose contents
            haven't been processed count as 0.
      required:
        - id
        - name
        - type
        - createdAt
        - updatedAt
        - createdBy
        - collection
        - folder
        - pages
    error.BAD_REQUEST:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Invalid input data
        code:
          type: string
          description: The error code
          example: BAD_REQUEST
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
      required:
        - message
        - code
      title: Invalid input data error (400)
      description: The error information
      example:
        code: BAD_REQUEST
        message: Invalid input data
        issues: []
    error.UNAUTHORIZED:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Authorization not provided
        code:
          type: string
          description: The error code
          example: UNAUTHORIZED
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
      required:
        - message
        - code
      title: Authorization not provided error (401)
      description: The error information
      example:
        code: UNAUTHORIZED
        message: Authorization not provided
        issues: []
    error.FORBIDDEN:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Insufficient access
        code:
          type: string
          description: The error code
          example: FORBIDDEN
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
      required:
        - message
        - code
      title: Insufficient access error (403)
      description: The error information
      example:
        code: FORBIDDEN
        message: Insufficient access
        issues: []
    error.NOT_FOUND:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Not found
        code:
          type: string
          description: The error code
          example: NOT_FOUND
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
      required:
        - message
        - code
      title: Not found error (404)
      description: The error information
      example:
        code: NOT_FOUND
        message: Not found
        issues: []
    error.TOO_MANY_REQUESTS:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Rate limit exceeded. Retry after the Retry-After interval.
        code:
          type: string
          description: The error code
          example: TOO_MANY_REQUESTS
      required:
        - message
        - code
      title: Too many requests error (429)
      description: The error information
      example:
        code: TOO_MANY_REQUESTS
        message: Rate limit exceeded. Retry after the Retry-After interval.
    error.INTERNAL_SERVER_ERROR:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Internal server error
        code:
          type: string
          description: The error code
          example: INTERNAL_SERVER_ERROR
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
      required:
        - message
        - code
      title: Internal server error error (500)
      description: The error information
      example:
        code: INTERNAL_SERVER_ERROR
        message: Internal server error
        issues: []
    User:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        email:
          type:
            - string
            - 'null'
      required:
        - id
        - name
        - email
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: An Admin API key, starting with `cas_admin_`.

````

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