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

# Confirm a drive upload

> Last step of a file upload to a drive. Send the ETag from the storage response and the key from the upload permission. The response is the file. Its id is what GET /files/{file_pid} and DELETE /files/{file_pid} take.



## OpenAPI

````yaml /openapi.json post /drives/upload
openapi: 3.1.0
info:
  title: Cominty API
  description: >-
    The HTTP API behind the Cominty Python SDK: chat and threads, memory, MCP
    integrations, agents, skills, document sources, and documents. Send your API
    key in the x-cominty-token header.
  version: main.5359267
servers:
  - url: https://ds.cominty.com
security:
  - comintyToken: []
paths:
  /drives/upload:
    post:
      tags:
        - drives
      summary: Confirm a drive upload
      description: >-
        Last step of a file upload to a drive. Send the ETag from the storage
        response and the key from the upload permission. The response is the
        file. Its id is what GET /files/{file_pid} and DELETE /files/{file_pid}
        take.
      operationId: confirm_upload_drives_upload_post
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssetUploadConfirmation'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    AssetUploadConfirmation:
      properties:
        etag:
          type: string
          title: Etag
          description: ETag returned by the storage upload.
        key:
          type: string
          title: Key
          description: key field from the upload permission's fields.
      type: object
      required:
        - etag
        - key
      title: AssetUploadConfirmation
    FileOut:
      properties:
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        id:
          type: string
          title: Id
          description: Identifier of the file.
        name:
          type: string
          title: Name
        size:
          type: integer
          title: Size
        mimetype:
          type: string
          title: Mimetype
      additionalProperties: false
      type: object
      required:
        - created_at
        - updated_at
        - id
        - name
        - size
        - mimetype
      title: FileOut
    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
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    comintyToken:
      type: apiKey
      in: header
      name: x-cominty-token
      description: >-
        A Cominty Platform API secret. A key created now starts with sk-cmt-.
        Send it as is, or as Bearer sk-cmt-..., with at most one Bearer prefix.
        A key created before the prefix existed has no sk-cmt- and still works.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.