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

# Confirm Upload

> Confirm that a file was successfully uploaded to storage.

Call this endpoint after successfully uploading a file using the presigned URL
from /upload. This will verify the file exists, get the actual file size,
and mark it as completed.

Accepts either integer file_id (e.g., "4") or hashid (e.g., "npl94jxy").

This makes the file available for use in workflows.



## OpenAPI

````yaml https://www.datalab.to/openapi.json get /api/v1/files/{file_id_or_hashid}/confirm
openapi: 3.1.0
info:
  title: Datalab API
  version: 0.0.1
servers:
  - url: https://www.datalab.to
    description: Datalab API
security: []
paths:
  /api/v1/files/{file_id_or_hashid}/confirm:
    get:
      tags:
        - files
      summary: Confirm Upload
      description: >-
        Confirm that a file was successfully uploaded to storage.


        Call this endpoint after successfully uploading a file using the
        presigned URL

        from /upload. This will verify the file exists, get the actual file
        size,

        and mark it as completed.


        Accepts either integer file_id (e.g., "4") or hashid (e.g., "npl94jxy").


        This makes the file available for use in workflows.
      operationId: confirm_upload_api_v1_files__file_id_or_hashid__confirm_get
      parameters:
        - name: file_id_or_hashid
          in: path
          required: true
          schema:
            type: string
            title: File Id Or Hashid
        - name: wos-session
          in: cookie
          required: false
          schema:
            type: string
            title: Wos-Session
        - name: datalab_active_team
          in: cookie
          required: false
          schema:
            type: string
            title: Datalab Active Team
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConfirmUploadResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    ConfirmUploadResponse:
      properties:
        success:
          type: boolean
          title: Success
          description: Whether the confirmation was successful
          default: true
        file_id:
          type: integer
          title: File Id
          description: File ID
        reference:
          type: string
          title: Reference
          description: File reference in datalab://file-{id} format
        message:
          type: string
          title: Message
          description: Confirmation message
      type: object
      required:
        - file_id
        - reference
        - message
      title: ConfirmUploadResponse
      description: Response after confirming upload.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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

````