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

# Lista dokumentów

> Zwraca wszystkie dokumenty bazy wiedzy organizacji.



## OpenAPI

````yaml /api-reference/openapi.pl.json get /api/v1/knowledge-base/documents
openapi: 3.1.0
info:
  title: Brosbots API
  description: >
    Publiczne REST API Brosbots. Buduj i zarządzaj agentami głosowymi,

    uruchamiaj kampanie wychodzące, odczytuj rozmowy i zużycie oraz zarządzaj

    numerami telefonów, narzędziami, bazami wiedzy i integracjami.


    ## Uwierzytelnianie


    Każde żądanie musi zawierać klucz API organizacji w nagłówku `X-API-Key`:


    ```

    X-API-Key: bb_live_...

    ```


    Klucze tworzysz i unieważniasz w panelu: kliknij swoje konto w lewym dolnym
    rogu paska bocznego, a potem **Brosbots API**.


    ## Adres bazowy


    ```

    https://app.brosbots.com/api/v1

    ```


    ## Konwencje


    - Ciała żądań i odpowiedzi są w JSON (`Content-Type: application/json`).

    - Znaczniki czasu w ISO 8601 ze strefą czasową.

    - Listy stronicowane parametrami `page` / `limit`; odpowiedź zawiera
      `total_count` / `total_pages`.
    - Błędy używają standardowych kodów HTTP z ciałem JSON:
      `{"detail": "czytelny powód błędu"}`.
    - `{agent_id}` przyjmuje publiczne ID agenta (`agent_...`) albo jego numer.


    ## Limity


    API nie ma dziś stałego limitu liczby zapytań na klucz. Kod `429` zwracają

    endpointy dzwoniące (`POST /agents/{agent_id}/calls` i

    `POST /triggers/{trigger_id}/calls`), gdy wszystkie kanały wychodzące są
    zajęte; nagłówek `Retry-After` podaje, ile sekund odczekać.

    Obsługuj `429` ogólnie: czekaj tyle, ile mówi `Retry-After`, a gdy go nie ma
    -

    ponawiaj z wykładniczym odstępem. Limit zapytań może zostać wprowadzony.
  version: 1.0.0
servers: []
security:
  - ApiKeyAuth: []
paths:
  /api/v1/knowledge-base/documents:
    get:
      tags:
        - Baza wiedzy
      summary: Lista dokumentów
      description: Zwraca wszystkie dokumenty bazy wiedzy organizacji.
      operationId: get_knowledge_base_documents
      parameters:
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filtr statusu przetwarzania.
          description: Filtr statusu przetwarzania.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            default: 100
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
        - name: X-API-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
      responses:
        '200':
          description: Pomyślna odpowiedź
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentListResponseSchema'
        '404':
          description: Nie znaleziono
        '422':
          description: Błąd walidacji
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    DocumentListResponseSchema:
      properties:
        documents:
          items:
            $ref: '#/components/schemas/DocumentResponseSchema'
          type: array
        total:
          type: integer
        limit:
          type: integer
        offset:
          type: integer
      type: object
      required:
        - documents
        - total
        - limit
        - offset
      title: DocumentListResponseSchema
      description: Lista dokumentów.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
      type: object
      title: HTTPValidationError
    DocumentResponseSchema:
      properties:
        id:
          type: integer
        document_uuid:
          type: string
        filename:
          type: string
        file_size_bytes:
          type: integer
        file_hash:
          type: string
        mime_type:
          type: string
        processing_status:
          type: string
        processing_error:
          anyOf:
            - type: string
            - type: 'null'
        total_chunks:
          type: integer
        custom_metadata:
          additionalProperties: true
          type: object
        docling_metadata:
          additionalProperties: true
          type: object
        source_url:
          anyOf:
            - type: string
            - type: 'null'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        organization_id:
          type: integer
        created_by:
          type: integer
        is_active:
          type: boolean
      type: object
      required:
        - id
        - document_uuid
        - filename
        - file_size_bytes
        - file_hash
        - mime_type
        - processing_status
        - total_chunks
        - custom_metadata
        - docling_metadata
        - created_at
        - updated_at
        - organization_id
        - created_by
        - is_active
      title: DocumentResponseSchema
      description: Metadane dokumentu.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
        msg:
          type: string
        type:
          type: string
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Klucz API organizacji (konto w lewym dolnym rogu panelu → Brosbots API).

````

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