---
title: "Finish a multipart upload"
method: POST
path: "/media/{id}/complete"
tags: ["Media"]
---

# Finish a multipart upload

`POST /media/{id}/complete`

## Request

- Base URL: `https://preflight.social/v1`
- URL: `https://preflight.social/v1/media/{id}/complete`
- Auth: HTTP bearer

## Request body

- object
  - `parts` object[], required
    - `partNumber` integer, required
    - `etag` string, required

## Response `200`

The file, now processing or ready.

- Media
  - `id` string, uuid
  - `kind` 'image' | 'video'
  - `status` 'awaiting_upload' | 'ingesting' | 'processing' | 'ready' | 'failed' | 'deleted'
  - `mimeType` string, nullable
  - `sizeBytes` integer, nullable
  - `durationSeconds` number, nullable
  - `width` integer, nullable
  - `height` integer, nullable
  - `fps` number, nullable
  - `fileName` string, nullable
  - `previewUrl` string, uri, nullable: A short-lived link to the file.
  - `error` string, nullable
  - `createdAt` string, date-time

## Other responses

- `400`: The body did not validate (invalid_request; field says which).
- `401`: Missing, expired or unrecognised key.
- `404`: No such post, file or account in this workspace.

---

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