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

# Complete File Upload

> Complete the file upload process and validate the uploaded JSON file. This endpoint verifies the file exists, validates its JSON format, and updates the file status to completed.



## OpenAPI

````yaml openapi/files.json POST /v1/files/{file_id}/complete
openapi: 3.0.3
info:
  title: Files API
  version: 1.0.0
servers:
  - url: https://api.olostep.com
security: []
paths:
  /v1/files/{file_id}/complete:
    post:
      summary: Complete File Upload
      description: >-
        Complete the file upload process and validate the uploaded JSON file.
        This endpoint verifies the file exists, validates its JSON format,
        checks file size (max 200MB), and updates the file status to completed.
      parameters:
        - name: file_id
          in: path
          required: true
          description: Unique identifier for the file to complete.
          schema:
            type: string
      responses:
        '200':
          description: File upload completed successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: File ID
                  object:
                    type: string
                    description: The kind of object. "file" for this endpoint.
                  created:
                    type: integer
                    description: Created epoch timestamp
                  filename:
                    type: string
                    description: The filename of the uploaded file
                  bytes:
                    type: integer
                    description: File size in bytes
                  purpose:
                    type: string
                    description: The purpose of the file
                  status:
                    type: string
                    description: >-
                      File status. Will be 'completed' after successful
                      completion.
        '400':
          description: >-
            Bad request. File already completed, invalid status, file too large
            (max 200MB), or invalid JSON format.
        '401':
          description: Invalid API key
        '404':
          description: File not found or file not uploaded to S3
        '500':
          description: Internal server error
      security:
        - Authorization: []
components:
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form Bearer <token>, where <token>
        is your auth token.

````