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

# List Files

> Retrieve a paginated list of all files across all cases belonging to the authenticated user.

Retrieve a paginated list of all files across all cases belonging to the authenticated user. This endpoint provides a comprehensive view of file metadata, analysis status, and risk scores.

## Key Features

* **Pagination**: Use `limit` and `offset` query parameters for large result sets.
* **Reverse Chronological**: Files are returned newest first.
* **Unified View**: See all user files regardless of which case they belong to.

## Best Practices

1. **Batch Processing**: Use a `limit` of 100 for batch background processing.
2. **UI Display**: Use a `limit` of 20-50 for optimal UI performance and loading speed.
3. **Status Filtering**: Check the `analysis_status` to determine which files have completed forensic review.


## OpenAPI

````yaml GET /files
openapi: 3.1.0
info:
  title: Veridox Core API
  description: Veridox Core Platform API
  version: 0.0.1
  contact: {}
servers:
  - url: https://api.uk.veridox.ai
    description: Live (UK)
  - url: https://api.ca.veridox.ai
    description: Live (CA)
security: []
tags:
  - name: Status
    description: System status and health check endpoints
  - name: Cases
    description: Case and case file management
  - name: Organisations
    description: Organisation management
  - name: Document Requests
    description: Document request management
  - name: Search
    description: Search functionality
  - name: Admin
    description: Administrative endpoints
paths:
  /files:
    get:
      tags:
        - Case Files
      summary: List all files
      description: >-
        Returns all files across all cases belonging to the authenticated
        customer. Supports pagination via limit (default: 50) and offset
        (default: 0) query parameters. Can be sorted by date_created or
        risk_score in ascending or descending order. Includes file metadata,
        analysis status, and upload information.
      operationId: CaseFilesController_listAllFiles
      parameters:
        - name: limit
          required: false
          in: query
          description: Maximum number of files to return
          schema:
            minimum: 1
            maximum: 100
            default: 50
            type: integer
        - name: offset
          required: false
          in: query
          description: Number of files to skip for pagination
          schema:
            minimum: 0
            maximum: 9007199254740991
            default: 0
            type: integer
        - name: sort_by
          required: false
          in: query
          description: Field to sort by
          schema:
            default: date_created
            type: string
            enum:
              - date_created
              - risk_score
        - name: sort_order
          required: false
          in: query
          description: 'Sort order: asc (ascending) or desc (descending)'
          schema:
            default: desc
            type: string
            enum:
              - asc
              - desc
      responses:
        '200':
          description: File list retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileListResponseDto'
        '400':
          description: Invalid pagination parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
        '401':
          description: Unauthorized (invalid or missing authentication token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
        '429':
          description: Too many requests (rate limit exceeded)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
      security:
        - api-key: []
components:
  schemas:
    FileListResponseDto:
      type: object
      properties:
        files:
          type: array
          items:
            type: object
            properties:
              file_id:
                type: string
                format: uuid
                pattern: >-
                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$
              case_id:
                type: string
                format: uuid
                pattern: >-
                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$
              case_label:
                anyOf:
                  - type: string
                  - type: 'null'
              label:
                anyOf:
                  - type: string
                  - type: 'null'
              mime_type:
                anyOf:
                  - type: string
                  - type: 'null'
              thumbnail_url:
                anyOf:
                  - type: string
                  - type: 'null'
              current_risk_score:
                anyOf:
                  - type: string
                  - type: 'null'
              analysis_status:
                type: string
                enum:
                  - waiting_for_upload
                  - processing
                  - settled
              analysis_outcome:
                anyOf:
                  - type: string
                    enum:
                      - success
                      - failed
                  - type: 'null'
              current_analysis_phase:
                anyOf:
                  - type: string
                  - type: 'null'
              uploaded_at:
                anyOf:
                  - type: string
                    format: date-time
                    pattern: >-
                      ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                  - type: 'null'
              created_at:
                type: string
                format: date-time
                pattern: >-
                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
              team_id:
                type: string
                format: uuid
                pattern: >-
                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
              team_name:
                type: string
            required:
              - file_id
              - case_id
              - case_label
              - label
              - mime_type
              - thumbnail_url
              - current_risk_score
              - analysis_status
              - analysis_outcome
              - current_analysis_phase
              - uploaded_at
              - created_at
          x-nestjs_zod-uses-3-point-1-syntax: true
        total:
          type: number
          x-nestjs_zod-uses-3-point-1-syntax: true
      required:
        - files
        - total
    ErrorDto:
      type: object
      properties:
        error_code:
          type: string
          description: Machine-readable error code for programmatic handling
          examples:
            - request.cases.file.missing-risk-score
            - request.authentication.invalid-token
            - request.forbidden
            - request.cases.case.not-found
            - request.cases.case.already-locked
        error_message:
          type: string
          description: Human-readable error message explaining what went wrong
          example: >-
            User tried to perform an invalid operation on a file without a risk
            score.
        error_details:
          type: object
          example:
            field: email_address
      required:
        - error_code
        - error_message
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: x-api-key

````