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

# Confirm a file upload by server-side HEAD validation



## OpenAPI

````yaml /api-reference/mobilerun-va-chat.yaml post /agents/files/{fileId}/confirm
openapi: 3.1.0
info:
  title: Mobilerun VA Chat
  version: v1
servers:
  - description: Droidrun Cloud API
    url: https://api.mobilerun.ai/v1
security:
  - bearerAuth: []
paths:
  /agents/files/{fileId}/confirm:
    post:
      tags:
        - Files
      summary: Confirm a file upload by server-side HEAD validation
      operationId: filesConfirm
      parameters:
        - in: path
          name: fileId
          required: true
          schema:
            format: uuid
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  actualSizeBytes:
                    type: number
                  createdAt:
                    format: date-time
                    type: string
                  createdBy:
                    enum:
                      - user
                      - agent
                      - workflow
                    type: string
                  displayName:
                    type:
                      - string
                      - 'null'
                  enabled:
                    type: boolean
                  fileId:
                    format: uuid
                    type: string
                  filename:
                    type: string
                  mimeType:
                    type: string
                  sizeBytes:
                    type: number
                  state:
                    enum:
                      - ready
                    type: string
                  zone:
                    enum:
                      - user
                      - agent
                      - workflow
                      - skills
                    type: string
                required:
                  - fileId
                  - filename
                  - displayName
                  - mimeType
                  - sizeBytes
                  - zone
                  - enabled
                  - createdAt
                  - createdBy
                  - state
                  - actualSizeBytes
                type: object
          description: Upload confirmed and validated
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
                required:
                  - message
                type: object
          description: File not found
        '410':
          content:
            application/json:
              schema:
                properties:
                  error:
                    enum:
                      - expired
                    type: string
                  fileId:
                    format: uuid
                    type: string
                required:
                  - error
                  - fileId
                type: object
          description: Reservation expired — the pending row's TTL has elapsed
        '422':
          content:
            application/json:
              schema:
                properties:
                  error:
                    enum:
                      - confirm_failed
                    type: string
                  fileId:
                    format: uuid
                    type: string
                  reason:
                    enum:
                      - missing
                      - size_mismatch
                      - oversize
                      - mime_mismatch
                    type: string
                required:
                  - error
                  - fileId
                  - reason
                type: object
          description: Upload failed validation against the declared mint metadata
        '500':
          description: Internal Server Error
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Mobilerun from '@mobilerun/sdk';


            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });


            const response = await
            client.files.confirm('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');


            console.log(response.actualSizeBytes);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            response = client.files.confirm(
                "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(response.actual_size_bytes)
components:
  securitySchemes:
    bearerAuth:
      bearerFormat: Opaque
      description: Bearer token via Authorization header
      scheme: bearer
      type: http

````