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

# Complete Upload

> Joins a video's uploaded parts into the file and starts its processing.

> [!WARNING]
>
> The Game Data API is in preview. Endpoints, fields and limits may change before release, and it is not yet available to call.

Call it once every part of the video has been uploaded ([Uploading a video](https://docs.uplift.ai/api-reference/game-data/videos/create.md#uploading-a-video)). It takes no body.

When parts are missing, or aren't the right size, it returns `400` with their numbers in `missing_parts`. Upload those parts again, with new links from [Get Upload Links](https://docs.uplift.ai/api-reference/game-data/videos/upload-links.md) if theirs have expired, then call it again.

Once the upload is complete, the video's processing starts: follow its `status` with [List Videos](https://docs.uplift.ai/api-reference/game-data/videos/list.md).


## OpenAPI

````yaml api-reference/game-data/openapi.json POST /games/{game_id}/videos/{video_id}/upload/complete
openapi: 3.0.0
info:
  title: Uplift Game Data API (Preview)
  version: v1
  description: >-
    Events, phases, possessions, physical summaries and tracking from match
    video. In preview: not yet available.
servers:
  - url: https://api.uplift.ai/v1
security: []
paths:
  /games/{game_id}/videos/{video_id}/upload/complete:
    post:
      tags:
        - Games
      summary: Complete Upload
      description: Joins a video's uploaded parts into the file and starts its processing.
      parameters:
        - name: game_id
          in: path
          required: true
          description: Game identifier. The game must belong to your organization.
          schema:
            type: string
            format: uuid
        - name: video_id
          in: path
          required: true
          description: Video identifier, from Create Video.
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: The upload is complete and processing has started.
          content:
            application/json:
              schema:
                type: object
                properties:
                  video_id:
                    type: string
                    format: uuid
                  parts:
                    type: integer
                    description: Parts joined.
                  bytes:
                    type: integer
                    description: The file's size.
              example:
                video_id: 0d4e2b7a-1c3f-4e5a-9b8c-7d6e5f4a3b2c
                parts: 48
                bytes: 3221225472
        '400':
          description: Parts are missing or not the right size, listed in `missing_parts`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: BadRequest
                message: >-
                  The upload needs 2 of its 48 parts again: missing, or not
                  their size.
                missing_parts:
                  - 17
                  - 48
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: Not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: NotFound
                message: The specified video_id was not found in the game.
        '409':
          description: The upload is already complete or was canceled.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Conflict
                message: This upload is already complete or was cancelled.
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - bearerAuth: []
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          description: A short error code representing the type of error.
        message:
          type: string
          description: A detailed message explaining the error.
        problems:
          type: array
          items:
            type: string
          description: >-
            Create Game and Update Game: why the roster is not valid, up to 25,
            each naming its row.
        missing_parts:
          type: array
          items:
            type: integer
          description: 'Complete Upload: the parts to upload again.'
  responses:
    Unauthorized:
      description: Unauthorized. Bearer token is missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Unauthorized
            message: Bearer token is missing or invalid.
    Forbidden:
      description: Forbidden. You do not have permission to access this resource.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Forbidden
            message: You do not have permission to access this resource.
    TooManyRequests:
      description: Too Many Requests. The rate limit has been exceeded.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: TooManyRequests
            message: The rate limit has been exceeded. Please wait and try again later.
    InternalServerError:
      description: Internal Server Error. Something went wrong on the server.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: InternalServerError
            message: >-
              An unexpected error occurred on the server. Please try again
              later.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

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