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

# Mark upload as complete

> Mark a file upload as complete by updating modified_at timestamp. If error query parameter is provided, deletes the file and logs the error.



## OpenAPI

````yaml /api-reference/cx/swagger.json post /cp/upload/{file}/done
openapi: 3.0.0
info:
  description: CX API.
  title: CX API
  contact:
    name: API Support
    url: https://stax.ai
    email: support@stax.ai
  version: '1.0'
servers:
  - url: https://api.cx.stax.ai
security: []
paths:
  /cp/upload/{file}/done:
    post:
      tags:
        - client-portal
      summary: Mark upload as complete
      description: >-
        Mark a file upload as complete by updating modified_at timestamp. If
        error query parameter is provided, deletes the file and logs the error.
      parameters:
        - description: File ID
          name: file
          in: path
          required: true
          schema:
            type: string
        - description: Error message (if provided, file will be deleted)
          name: error
          in: query
          schema:
            type: string
      responses:
        '200':
          description: Upload completion status
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/pkg_routes_cp_files.UploadCompleteResponse
        '400':
          description: Bad request - invalid file ID
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '404':
          description: File not found
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
components:
  schemas:
    pkg_routes_cp_files.UploadCompleteResponse:
      type: object
      properties:
        ok:
          type: boolean

````

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