---
title: "Upload a video file to an Advanced Local Video(s) banner"
type: reference
method: POST
path: /rest-api/banner/{bannerId}/vast/media-files.do
tag: "VAST"
---

# Upload a video file to an Advanced Local Video(s) banner

`POST https://YOUR-NETWORK-DOMAIN/rest-api/banner/{bannerId}/vast/media-files.do`

Adds a video to the banner's video files, as the console's Video files grid does: a multipart 'file', or a public http(s) 'url' the server downloads once. Where the network compresses video creatives, 'scaleTo' picks the renditions to store (ORIGINAL, _1080P, _720P, _480P, _360P, _320P, _240P; ORIGINAL when none); otherwise the file is stored as uploaded. The network's video size limit applies. Needs the Advanced Local Video(s) permission and update rights on the banner's advertiser. Answers with the banner's video files and the ids of the new ones.

## Path params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `bannerId` | integer | yes | `5001` | Advanced Local Video(s) banner id |

## Query params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `url` | string | no | `https://cdn.northwind.example/spring_30.mp4` | Public http(s) link to the video; used when no file is sent |
| `scaleTo` | array<string> | no | `_720P` | Renditions to store where the network compresses video creatives |

## Body

A multipart form: `file` (file).

## Responses

- `200` — {bannerId, created:[ids], total, mediaFiles:[…]}; a rendition that failed while others were stored is named in 'msg'
- `400` — No file or url, an unsupported or unreadable video, a refused link, or not an Advanced Local Video(s) banner
- `401` — Authentication error
- `403` — The Advanced Local Video(s) permission is off, or no update rights on the banner
- `404` — The banner does not exist or is deleted

## Example request

```bash
curl --request POST \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/banner/5001/vast/media-files.do?url=https%3A%2F%2Fcdn.northwind.example%2Fspring_30.mp4&scaleTo=_720P' \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --form 'file=@video.mp4'
```

Source: https://epom.com/ad-server/docs/api/vast/post-banner-vast-media-files