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

# List knowledge sources

> Cursor-paginated, newest first. `body` is omitted on list — retrieve a single source for the full text. Archived sources are excluded unless `archived=true`.




## OpenAPI

````yaml https://app.pepline.ai/api/v1/openapi.yaml get /knowledge_sources
openapi: 3.1.0
info:
  title: pepline API
  version: '1'
  description: |
    The pepline knowledge ingestion API: push knowledge into your
    organization's library from your own systems — CMS hooks, sync scripts,
    Zapier/Make/n8n scenarios — and keep whole websites fresh. One inbound
    API instead of N connectors; you own the trigger, we own idempotency.
servers:
  - url: https://app.pepline.ai/api/v1
security:
  - bearerAuth: []
tags:
  - name: Organization
    description: The identity behind your key — confirm it works and read your agent slugs.
  - name: Knowledge sources
    description: >-
      Push and sync the knowledge your agents stand on — text, files, pages,
      whole websites.
  - name: Agents
    description: List and provision agents, and tune each agent's widget settings.
  - name: Services
    description: The offerings your agents present and reason about.
  - name: Fit criteria
    description: What makes a good or poor lead — the signals your agents qualify against.
  - name: Voice profiles
    description: How your agents sound — tone, formality, phrasing.
  - name: Flow
    description: >-
      Author an agent's conversation — its phases and the answers each one
      captures.
  - name: Catalog
    description: >-
      Draft services, voice, and fit criteria from your knowledge, then accept
      or dismiss the proposals.
paths:
  /knowledge_sources:
    get:
      tags:
        - Knowledge sources
      summary: List knowledge sources
      description: >
        Cursor-paginated, newest first. `body` is omitted on list — retrieve a
        single source for the full text. Archived sources are excluded unless
        `archived=true`.
      operationId: listKnowledgeSources
      parameters:
        - name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
        - name: starting_after
          in: query
          schema:
            type: integer
          description: >-
            Return sources with ids strictly below this id (the last id of the
            previous page).
        - name: status
          in: query
          schema:
            type: string
            enum:
              - ready
              - updating
              - attention
              - failed
        - name: kind
          in: query
          schema:
            type: string
            enum:
              - text
              - url
              - file
              - website
        - name: external_id
          in: query
          schema:
            type: string
        - name: archived
          in: query
          schema:
            type: string
            enum:
              - 'true'
          description: List only archived sources.
      responses:
        '200':
          description: A page of sources.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KnowledgeSourceList'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    KnowledgeSourceList:
      type: object
      required:
        - object
        - data
        - has_more
      properties:
        object:
          type: string
          const: list
        data:
          type: array
          items:
            $ref: '#/components/schemas/KnowledgeSource'
        has_more:
          type: boolean
    KnowledgeSource:
      type: object
      required:
        - object
        - id
        - kind
        - title
        - status
        - agents
        - metadata
        - entries
        - archived
        - created_at
      properties:
        object:
          type: string
          const: knowledge_source
        id:
          type: integer
        external_id:
          type:
            - string
            - 'null'
        kind:
          type: string
          enum:
            - text
            - url
            - file
            - website
        title:
          type: string
        url:
          type:
            - string
            - 'null'
          description: The page (url) or site root (website).
        status:
          type: string
          enum:
            - ready
            - updating
            - attention
            - failed
          description: >
            Aggregated from the source's entries: ready (everything ingested),
            updating (work in flight — poll), attention (usable with some failed
            entries), failed (nothing usable).
        failure_reason:
          type:
            - string
            - 'null'
          description: >-
            Single-entry kinds: why processing failed, human-readable. Websites
            report per-entry reasons under /entries.
        language:
          type:
            - string
            - 'null'
        digest:
          type:
            - string
            - 'null'
          description: >-
            What the agent understood from this source (generated after each
            refresh).
        agents:
          type: array
          items:
            type: string
          description: Slugs of the agents this source is active for.
        metadata:
          type: object
          additionalProperties:
            type: string
        entries:
          type: object
          description: Entry counts by status (one entry per page for websites).
          required:
            - total
            - ingested
            - pending
            - failed
          properties:
            total:
              type: integer
            ingested:
              type: integer
            pending:
              type: integer
            failed:
              type: integer
        max_pages:
          type:
            - integer
            - 'null'
          description: website kind only.
        archived:
          type: boolean
        created_at:
          type: string
          format: date-time
        last_update_at:
          type:
            - string
            - 'null'
          format: date-time
          description: When the last refresh run landed — the freshness stamp.
        body:
          type: string
          description: >-
            Full text. Present on retrieve/create/update for text/url/file;
            websites read per-page content via /entries.
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - type
            - code
            - message
          properties:
            type:
              type: string
              enum:
                - authentication_error
                - invalid_request_error
                - rate_limit_error
                - api_error
            code:
              type: string
              enum:
                - missing_api_key
                - invalid_api_key
                - resource_missing
                - method_not_allowed
                - resource_archived
                - idempotency_conflict
                - parameter_invalid
                - parameter_missing
                - parameter_unknown
                - organization_required
                - rate_limited
                - flow_invalid
                - internal
            message:
              type: string
            param:
              type: string
  responses:
    Unauthorized:
      description: Missing, malformed, or revoked API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your secret key (pep_sk_…) from Settings → API. Keys are org-scoped;
        treat them like passwords.

````