---
title: "Uploads new media asset."
method: POST
path: "/media"
tags: ["Media"]
---

# Uploads new media asset.

`POST /media`

## Request

- Base URL: `https://api.reveldigital.com`
- URL: `https://api.reveldigital.com/media`
- 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/post.ts> (a function with typed inputs; its response is checked against the schema)

POST body must be in multipart/form-data format

## Request body `multipart/form-data`

- object
  - `file` string, binary: The media file
  - `name` string: The media name
  - `group_id` string: The group id
  - `tags` string: The tags associated with this media
  - `advertiser_id` string: The advertiser id. Optional
  - `is_shared` boolean: Is this media shared with other accounts
  - `start_date` string, date-time: The start date for this media
  - `end_date` string, date-time: The end date for this media

## Response `201`

Created

- 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`: Bad Request

---

[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)
