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

# List documents

> Retrieves a paginated list of all documents accessible to the user.
Includes direct access, documents in accessible workspaces (including assistant-linked workspaces), and assistant default files.



## OpenAPI

````yaml /api-reference/openapi.en.json get /documents
openapi: 3.1.0
info:
  title: UBIK Public API
  description: Publicly accessible API endpoints for UBIK.
  version: '1.0'
servers:
  - url: https://app.ubik-agent.com/api/v1
    description: Production Server
security: []
paths:
  /documents:
    get:
      tags:
        - Public API
        - Public API - Documents
      summary: List documents
      description: >-
        Retrieves a paginated list of all documents accessible to the user.

        Includes direct access, documents in accessible workspaces (including
        assistant-linked workspaces), and assistant default files.
      operationId: get_documents_documents_get
      parameters:
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
            title: Page
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            default: 20
            title: Limit
        - name: X-End-User-ID
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-End-User-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicPaginatedDocumentsResponse'
              example:
                items:
                  - id: c1d2e3f4-a5b6-7890-1234-567890abcdef
                    name: Q1 Sales Report.pdf
                    file_type: application/pdf
                    status: completed
                    created_at: '2025-09-28T10:05:00Z'
                    updated_at: '2025-09-28T10:05:00Z'
                    processing_pipeline: default-pipeline
                total: 256
                page: 1
                limit: 20
                has_more: true
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    PublicPaginatedDocumentsResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/PublicDocumentListItem'
          type: array
          title: Items
        total:
          type: integer
          title: Total
          description: Total number of documents available.
        page:
          type: integer
          title: Page
          description: The current page number.
        limit:
          type: integer
          title: Limit
          description: The number of items per page.
        has_more:
          type: boolean
          title: Has More
          description: Indicates if there are more pages available.
      type: object
      required:
        - items
        - total
        - page
        - limit
        - has_more
      title: PublicPaginatedDocumentsResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PublicDocumentListItem:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: The unique identifier for the document.
        name:
          type: string
          title: Name
          description: The display name of the document.
        file_type:
          anyOf:
            - type: string
            - type: 'null'
          title: File Type
          description: The MIME type of the document file.
        status:
          type: string
          title: Status
          description: The current processing status of the document.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: The timestamp when the document was created.
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: The timestamp when the document was last updated.
        processing_pipeline:
          anyOf:
            - type: string
            - type: 'null'
          title: Processing Pipeline
          description: The name of the processing pipeline used for this document.
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
          description: If processing failed, this field will contain the error message.
        api_metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Api Metadata
          description: >-
            Custom API metadata resolved for the current user. Useful for
            retrieving stored external references (e.g. {'internal_app_ref':
            'REF-123'}). Note: This value is resolved based on the request's
            external_user_id. A document shared globally but also scoped to a
            specific user may return different metadata depending on who is
            asking.
      type: object
      required:
        - id
        - name
        - status
        - created_at
        - updated_at
      title: PublicDocumentListItem
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-KEY

````