> ## 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.

# Confirm or Override Risk Score

> Confirm the current AI-generated risk score or override it with a new value.

Allow users to confirm the current AI-generated risk score or override it with a new value. This endpoint allows for human-in-the-loop validation of automated findings. An optional confirmation reason can be provided to document the decision.

## Best Practices

1. **Document Decisions**: Always provide a `confirmation_reason` when overriding AI assessments to maintain a clear audit trail.
2. **Review Full Analysis**: Always examine the detailed findings from the [Get File Analysis](./files-analysis-get) endpoint before confirming or changing a score.
3. **Wait for Completion**: Risk scores can only be confirmed once the file analysis has successfully reached the `settled` status.


## OpenAPI

````yaml POST /files/{fileId}/risk-score/confirm
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/{fileId}/risk-score/confirm:
    post:
      tags:
        - Case Files
      summary: Confirm or override file risk score
      description: >-
        Allows users to confirm the current AI-generated risk score or override
        it with a new value. An optional confirmation reason can be provided.
        The file must belong to a case owned by the authenticated user.
      operationId: CaseFilesController_confirmRiskScore
      parameters:
        - name: fileId
          required: true
          in: path
          description: File ID
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConfirmRiskScoreDto'
      responses:
        '201':
          description: Risk score confirmation created successfully
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid risk score or confirmation reason
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
        '401':
          description: Unauthorized (invalid or missing authentication token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
        '404':
          description: File not found, not owned by user, or no risk score to confirm
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
        '409':
          description: File analysis is not complete
        '429':
          description: Too many requests (rate limit exceeded)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
      security:
        - api-key: []
components:
  schemas:
    ConfirmRiskScoreDto:
      type: object
      properties:
        risk_score:
          type: string
        confirmation_reason:
          type: string
          maxLength: 1000
      required:
        - risk_score
    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

````