> ## 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 an upload

> Last step of a file upload. Send the ETag from the storage response and the key from the upload permission. The response is a conversation file. Use its id as file_ids on a chat message.



## OpenAPI

````yaml /openapi.json post /chat/files
openapi: 3.1.0
info:
  title: cominty/cominty
  description: |

    ### Cominty Meta:

    ```json
    {
      "VERSION_TAG": "eng-997-add-organization-scoped-memory-namespaces.6928eb8",
      "VERSION_AT": "2026-10-07T14:46:28+02:00",
      "DEPLOYED_BY": "github-actions::elfominty",
      "DEPLOYED_AT": "2026-10-07T13:06:50Z",
      "AWS_SECRET_NAME": "cominty-monorepo-dev-python-api",
      "AWS_SECRET_VERSION": "3de071f4-5485-4bf2-a676-0f72bf7aa59f",
      "AWS_SECRET_REGION": "eu-west-3"
    }
    ```
  version: eng-997-add-organization-scoped-memory-namespaces.6928eb8
servers:
  - url: https://ds.cominty.com
security:
  - comintyToken: []
paths:
  /chat/files:
    post:
      tags:
        - chat
        - chat
      summary: Confirm an upload
      description: >-
        Last step of a file upload. Send the ETag from the storage response and
        the key from the upload permission. The response is a conversation file.
        Use its id as file_ids on a chat message.
      operationId: confirm_upload_chat_files_post
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FileUploadConfirmation'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/cominty__api__routers__chat__ConversationFileOut
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    FileUploadConfirmation:
      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: FileUploadConfirmation
    cominty__api__routers__chat__ConversationFileOut:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        size:
          type: integer
          title: Size
        mimetype:
          type: string
          title: Mimetype
        origin:
          $ref: '#/components/schemas/ContentOrigin'
        share_links:
          items:
            $ref: '#/components/schemas/ShareLinkOut'
          type: array
          title: Share Links
        url:
          type: string
          title: Url
          readOnly: true
      additionalProperties: false
      type: object
      required:
        - id
        - name
        - size
        - mimetype
        - origin
        - share_links
        - url
      title: ConversationFileOut
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ContentOrigin:
      type: string
      enum:
        - user
        - agent
      title: ContentOrigin
    ShareLinkOut:
      properties:
        created_at:
          type: string
          format: date-time
          title: Created At
        id:
          type: string
          title: Id
        last_accessed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Accessed At
        access_count:
          type: integer
          title: Access Count
        revoked:
          type: boolean
          title: Revoked
        expires_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expires At
        expired:
          type: boolean
          title: Expired
        protected:
          type: boolean
          title: Protected
        url:
          type: string
          title: Url
          readOnly: true
      additionalProperties: false
      type: object
      required:
        - created_at
        - id
        - last_accessed_at
        - access_count
        - revoked
        - expires_at
        - expired
        - protected
        - url
      title: ShareLinkOut
    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.