---
title: "Complete upload transaction"
method: PATCH
path: "/v2/media/s3/upload-transactions"
tags: ["Media - S3 Direct Upload"]
---

# Complete upload transaction

`PATCH /v2/media/s3/upload-transactions`

## Request

- Base URL: `https://app.metricool.com/api`
- URL: `https://app.metricool.com/api/v2/media/s3/upload-transactions`
- Auth: none declared

Completes an upload transaction. For multipart: provide uploadId, key and parts. For simple: provide the fileUrl of the already-uploaded file. PLANNER resources are automatically moved/converted to metricool-download on completion.

## Request body

- S3UploadCompleteRequest: Complete S3 upload request - supports multipart or single-part uploads
  - `multipart` S3CompleteMultipartUploadRequest: Request to complete a multipart upload to S3
    - `uploadId` string, required: AWS multipart upload ID returned from start multipart
    - `key` string, required: S3 object key returned from start multipart
    - `parts` S3CompletedPart[], required: List of completed parts with their ETags
      - `partNumber` integer, required: Part number (1-based index)
      - `etag` string, required: ETag returned by S3 after uploading the part
  - `simple` S3SimplePart: Single-part S3 upload information
    - `fileUrl` string, required: Complete URL of the file already uploaded to S3

## Response `200`

Upload completed successfully

- JsonOkResponseS3CompleteMultipartUploadResponse
  - `metadata` object
  - `page` JsonPaging
    - `next` string
  - `data` S3CompleteMultipartUploadResponse: Response after completing a multipart upload to S3
    - `key` string, required: S3 object key where the file is stored
    - `bucket` string, required: Name of the S3 bucket
    - `fileUrl` string, required: Full URL to access the uploaded file
    - `etag` string: ETag of the completed object
    - `convertedFileUrl` string: Final URL of the file after conversion (if applicable). Contains converted video URL if MOV was converted to MP4, otherwise same as fileUrl.

## Other responses

- `400`: Invalid request or missing parts
- `401`: User not authenticated
- `403`: Feature not enabled for user
- `404`: Upload ID not found

---

[API](https://skmtc.dev/metricool/apis/metricool-api.md) · [All operations](https://skmtc.dev/metricool/apis/metricool-api/llms.txt) · [OpenAPI document](https://skmtc.dev/metricool/apis/metricool-api/revisions/aea9d9a8415a?raw)
