---
title: "Finalize a presigned upload slot, ingesting the uploaded object into the media library."
method: POST
path: "/media/uploads/{id}/finalize"
tags: ["Media"]
---

# Finalize a presigned upload slot, ingesting the uploaded object into the media library.

`POST /media/uploads/{id}/finalize`

## Request

- Base URL: `https://api.reveldigital.com`
- URL: `https://api.reveldigital.com/media/uploads/{id}/finalize`
- Auth: one of:
  - OAuth 2
    - Authorization code: `https://id.reveldigital.com/connect/authorize`
    - Token URL: `https://id.reveldigital.com/connect/token` scopes: `webapi`
  - API key in header `X-RevelDigital-ApiKey`
  - API key in query parameter `api_key`
- TypeScript: <https://skmtc.dev/reveldigital/apis/revel-digital-rest-api/docs/media/uploads/:id/finalize/post.ts> (a function with typed inputs; its response is checked against the schema)

Verifies the object exists in S3 (HeadObject), validates its size against the configured
maximum, downloads the staged object to the shared local `Uploads` disk, and runs the
SAME ingestion + media-type detection as the multipart upload (malware scan, dimensions,
hashing, transcoding, replication) — so a `.webapp` is registered as a webapp and a
video is transcoded. Returns the created media. This call is idempotent — calling it again
returns the same media record.

## Path parameters

- `id` string, required

## Response `201`

Returns the created media

- Media: Represents a media asset (image, video, audio, document) in the RevelDigital content library. Media files are uploaded to the platform and referenced by playlists and templates for playback on devices.
  - `name` string, nullable: The media name
  - `group_id` string, nullable: The group id
  - `tags` string, nullable: The tags associated with this media
  - `advertiser_id` string, nullable: The advertiser id. Optional
  - `is_shared` boolean, nullable: Is this media shared with other accounts
  - `start_date` string, date-time, nullable: The start date for this media
  - `end_date` string, date-time, nullable: The end date for this media
  - `id` string, nullable: The media id
  - `group_name` string, nullable: The group name
  - `mime_type` string, nullable: The MIME type for this media
  - `file_size` integer: The file size in bytes
  - `file_name` string, nullable: The file name
  - `file_url` string, nullable: The file URL
  - `thumbnail_url` string, nullable: The thumbnail URL
  - `uploaded_on` string, date-time, nullable: The date the media was uploaded
  - `uploaded_by_id` string, nullable: The user id that uploaded the media
  - `sha_512` string, nullable: The SHA512 hash of the media file
  - `width` integer, nullable: The width of the media
  - `height` integer, nullable: The height of the media
  - `is_approved` boolean, nullable: Approval state. True = approved for playback, false = declined, null = pending review.
  - `approved_on` string, date-time, nullable: Timestamp the media was approved, if applicable.
  - `declined_on` string, date-time, nullable: Timestamp the media was declined, if applicable.
  - `declined_reason` string, nullable: Reason recorded when the media was declined, if any.

## Other responses

- `400`: If the object is missing or exceeds the maximum allowed size
- `404`: If the slot does not exist, has expired, or belongs to another account

---

[API](https://skmtc.dev/reveldigital/apis/revel-digital-rest-api.md) - [All operations](https://skmtc.dev/reveldigital/apis/revel-digital-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/reveldigital/apis/revel-digital-rest-api/revisions/39d5c8302822?raw)
