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

# Complete a direct upload

> Record a previously uploaded object as a Convertly Storage file. The request body should normally be the `complete.body` object returned by `POST /api/uploads`.



## OpenAPI

````yaml /openapi.json post /api/uploads/complete
openapi: 3.1.0
info:
  title: Convertly API
  version: 1.0.0
  description: >-
    Convertly provides production API endpoints for media conversion,
    compression, Image CDN delivery, Forma AI, HLS/DASH video streaming, media
    tools, async jobs, workflows, webhooks, and Convertly Storage.
  license:
    name: Proprietary
    url: https://convertly.sh/terms
servers:
  - url: https://convertly.sh
security:
  - bearerAuth: []
  - apiKeyAuth: []
paths:
  /api/uploads/complete:
    post:
      tags:
        - Files
      summary: Complete a direct upload
      description: >-
        Record a previously uploaded object as a Convertly Storage file. The
        request body should normally be the `complete.body` object returned by
        `POST /api/uploads`.
      operationId: completeUpload
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CompleteUploadRequest'
      responses:
        '200':
          description: Upload completion was already recorded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StoredFileResponse'
        '201':
          description: Stored file created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StoredFileResponse'
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
        '500':
          $ref: '#/components/responses/Error'
components:
  schemas:
    CompleteUploadRequest:
      type: object
      properties:
        path:
          type: string
          minLength: 1
        filename:
          type: string
          minLength: 1
          maxLength: 180
        contentType:
          type: string
          default: application/octet-stream
        sizeBytes:
          type: integer
          minimum: 1
        folderId:
          type:
            - string
            - 'null'
          format: uuid
      required:
        - path
        - filename
        - sizeBytes
    StoredFileResponse:
      type: object
      properties:
        file:
          $ref: '#/components/schemas/StoredFile'
      required:
        - file
    StoredFile:
      type: object
      properties:
        id:
          type: string
          format: uuid
        filename:
          type: string
        mime_type:
          type: string
        size_bytes:
          type: integer
        folder_id:
          type:
            - string
            - 'null'
          format: uuid
        created_at:
          type: string
          format: date-time
        downloadUrl:
          type:
            - string
            - 'null'
          format: uri
      required:
        - id
        - filename
        - mime_type
        - size_bytes
        - created_at
    Error:
      type: object
      properties:
        error:
          type: string
        upgradeUrl:
          type: string
      required:
        - error
  responses:
    Error:
      description: Error response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Dashboard-generated Convertly API key. Keys currently begin with
        `cvly_`.
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Alternative API key header for server-side clients.

````