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

# List Files



## OpenAPI

````yaml /development/api-reference/openapi.json get /api/v1/files
openapi: 3.1.0
info:
  title: Agentstack server
  version: 0.6.3
servers: []
security: []
paths:
  /api/v1/files:
    get:
      tags:
        - files
      summary: List Files
      operationId: list_files_api_v1_files_get
      parameters:
        - name: query
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/FileListQuery'
        - name: context_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Context Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResult_File_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBasic: []
        - HTTPBearer: []
components:
  schemas:
    FileListQuery:
      properties:
        limit:
          type: integer
          maximum: 100
          minimum: 1
          title: Limit
        page_token:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Page Token
        order:
          type: string
          pattern: ^(asc|desc)$
          title: Order
        order_by:
          type: string
          pattern: ^created_at|filename|file_size_bytes$
          title: Order By
        content_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Content Type
        filename_search:
          anyOf:
            - type: string
            - type: 'null'
          title: Filename Search
          description: >-
            Case-insensitive partial match search on filename (e.g., 'doc'
            matches 'my_document.pdf')
      type: object
      title: FileListQuery
      description: Query schema for listing files.
    PaginatedResult_File_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/File-Output'
          type: array
          title: Items
        total_count:
          type: integer
          title: Total Count
        has_more:
          type: boolean
          title: Has More
          default: false
        next_page_token:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Next Page Token
          readOnly: true
      type: object
      required:
        - items
        - total_count
        - next_page_token
      title: PaginatedResult[File]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    File-Output:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        filename:
          type: string
          title: Filename
        content_type:
          type: string
          maxLength: 256
          title: Content Type
        file_size_bytes:
          anyOf:
            - type: integer
            - type: 'null'
          title: File Size Bytes
        created_at:
          type: string
          format: date-time
          title: Created At
        created_by:
          type: string
          format: uuid
          title: Created By
        file_type:
          $ref: '#/components/schemas/FileType'
          default: user_upload
        parent_file_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Parent File Id
        context_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Context Id
      type: object
      required:
        - filename
        - content_type
        - created_by
      title: File
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    FileType:
      type: string
      enum:
        - user_upload
        - extracted_text
      title: FileType
  securitySchemes:
    HTTPBasic:
      type: http
      scheme: basic
    HTTPBearer:
      type: http
      scheme: bearer

````