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

# List a knowledge base's documents

> Pages through a knowledge base's documents, most recently changed first. Filter with `filter[<key>][<op>]=<value>` (conditions are ANDed; `in` repeats the parameter): `status` (queued, indexing, ready, failed; eq or in), `account` (account ids; eq or in), `external_id` (eq or in), `created_at` and `updated_at` (a date, YYYY-MM-DD, UTC days; eq, gt, gte, lt or lte: `updated_at` gte the day of your last sync lists what changed since). Anything else is a 422. A document is indexed in the background after it arrives or changes: `status` is queued, indexing, ready or failed (`error` says why), and `searchable` whether a search finds it (a document being indexed again keeps answering from its previous version). `url` is the link a worker gives a customer when it answers from it. A document with an `account_id` is left out when a worker answers another account; a search for no account in particular (a worker going over its whole book, or `knowledge_bases.search` without `account`) includes it.



## OpenAPI

````yaml /api/statisfy-api.openapi.json get /v1/knowledge_bases/{knowledge_base_id}/documents
openapi: 3.1.0
info:
  description: >-
    The agent-first Statisfy API. Authenticate with an API key (`Authorization:
    Bearer stfy_live_…`), then call `GET /v1/meta/capabilities` to discover
    every operation and its schemas.
  title: Statisfy API
  version: 1.0.0
servers:
  - url: https://api.statisfy.com
    description: Production
security: []
paths:
  /v1/knowledge_bases/{knowledge_base_id}/documents:
    get:
      tags:
        - knowledge_bases
      summary: List a knowledge base's documents
      description: >-
        Pages through a knowledge base's documents, most recently changed first.
        Filter with `filter[<key>][<op>]=<value>` (conditions are ANDed; `in`
        repeats the parameter): `status` (queued, indexing, ready, failed; eq or
        in), `account` (account ids; eq or in), `external_id` (eq or in),
        `created_at` and `updated_at` (a date, YYYY-MM-DD, UTC days; eq, gt,
        gte, lt or lte: `updated_at` gte the day of your last sync lists what
        changed since). Anything else is a 422. A document is indexed in the
        background after it arrives or changes: `status` is queued, indexing,
        ready or failed (`error` says why), and `searchable` whether a search
        finds it (a document being indexed again keeps answering from its
        previous version). `url` is the link a worker gives a customer when it
        answers from it. A document with an `account_id` is left out when a
        worker answers another account; a search for no account in particular (a
        worker going over its whole book, or `knowledge_bases.search` without
        `account`) includes it.
      operationId: knowledge_bases_list_documents
      parameters:
        - description: The knowledge base's id, from GET /v1/knowledge_bases
          in: path
          name: knowledge_base_id
          required: true
          schema:
            type: string
        - in: query
          name: limit
          required: false
          schema:
            default: 25
            maximum: 100
            minimum: 1
            type: integer
        - description: '`next_cursor` from the previous page'
          in: query
          name: cursor
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            default: null
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KnowledgeDocumentPage'
          description: Successful Response
      security:
        - HTTPBearer: []
components:
  schemas:
    KnowledgeDocumentPage:
      properties:
        data:
          items:
            $ref: '#/components/schemas/KnowledgeDocument'
          title: Data
          type: array
        has_more:
          default: false
          title: Has More
          type: boolean
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
      required:
        - data
      title: KnowledgeDocumentPage
      type: object
    KnowledgeDocument:
      properties:
        account_id:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Set when the document is filed for one account (from GET
            /v1/objects/account/records): a worker answering that account
            searches it, one answering another account does not. Null: searched
            for every account
          title: Account Id
        created_at:
          description: ISO 8601 UTC
          title: Created At
          type: string
        error:
          anyOf:
            - type: string
            - type: 'null'
          description: Why indexing failed; null unless status is failed
          title: Error
        external_id:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Your id for a document you pushed through this API; null for an
            upload or a connector's
          title: External Id
        format:
          description: >-
            Its file's type: pdf, docx or doc (an uploaded file); text, markdown
            or html; or another type a connector stored, such as a SharePoint
            spreadsheet or slides (xlsx, xls, pptx, ppt), which isn't indexed
          title: Format
          type: string
        id:
          title: Id
          type: string
        knowledge_base_id:
          title: Knowledge Base Id
          type: string
        searchable:
          description: >-
            Whether a search finds it: true once a version is indexed, and while
            a newer version is queued, indexing or failed the previous one keeps
            answering
          title: Searchable
          type: boolean
        source:
          description: >-
            Its knowledge base's source: Where its documents come from: api
            (pushed through this API), upload (files uploaded in the app),
            team_answers (articles the team approved in the app), or the
            connector that syncs it (intercom, zendesk, notion, google_drive,
            sharepoint, website)
          title: Source
          type: string
        source_url:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Where its connector found it (a help-center article, a page, a
            file); null otherwise
          title: Source Url
        status:
          description: >-
            queued (waiting to be indexed), indexing, ready, or failed (see
            error): how its latest version stands. `searchable` says whether a
            search finds it
          enum:
            - queued
            - indexing
            - ready
            - failed
          title: Status
          type: string
        title:
          description: >-
            Its title: a file's name for an upload, the page's or article's
            title otherwise
          title: Title
          type: string
        updated_at:
          description: 'ISO 8601 UTC: when its words or details last changed'
          title: Updated At
          type: string
        url:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The link a worker gives a customer when it answers from this
            document; null when it has none, and the worker then names it
            without a link
          title: Url
      required:
        - id
        - knowledge_base_id
        - title
        - format
        - source
        - status
        - searchable
        - created_at
        - updated_at
      title: KnowledgeDocument
      type: object
  securitySchemes:
    HTTPBearer:
      scheme: bearer
      type: http
      description: >-
        An API key, sent as `Authorization: Bearer stfy_live_…`. See
        [Authentication](/rest-api/authentication) for how to get one and which
        scopes it needs.

````

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