---
title: "Media Library API endpoints"
description: "Endpoint reference for the Media Library tag (6 endpoints): Videos, images and HTML5 ZIPs uploaded once and reused by any number of creatives"
type: "reference"
audience: [network-manager, admin]
keywords: [api, rest, endpoints, media, library]
---

Fetch the complete documentation index at: https://epom.com/ad-server/docs/llms.txt. Use this file to discover all available pages before exploring further. Append .md to any documentation page URL to get its markdown version.

# Media Library API endpoints

Videos, images and HTML5 ZIPs uploaded once and reused by any number of creatives. 6 endpoints, generated from the OpenAPI spec. Authentication, the response envelope, pagination and error codes are shared by all endpoints — see [REST API overview](https://epom.com/ad-server/docs/api.md). Parameters marked `form` go in an `application/x-www-form-urlencoded` request body.

### GET /rest-api/media-library/assets.do

[Request examples](https://epom.com/ad-server/docs/api/media-library/get-media-library-assets.md)

List media library files.

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `kind` | query | string | no | VIDEO, IMAGE or HTML5 Values: `VIDEO`, `IMAGE`, `HTML5`. |
| `query` | query | string | no | Part of the file's name or original file name |
| `advertiserId` | query | integer | no | Only files uploaded for this advertiser |
| `width` | query | integer | no | Exact width in pixels; used together with height |
| `height` | query | integer | no | Exact height in pixels; used together with width |
| `start` | query | integer | no | Index of the first file to return |
| `limit` | query | integer | no | Files per page, at most 100 |
| `sort` | query | string | no | CREATED, NAME or SIZE Values: `CREATED`, `NAME`, `SIZE`. |
| `dir` | query | string | no | ASC or DESC |

**Responses:** `200` — {success, available, total, more, start, limit, assets:[{id, name, kind, advertiserId, advertiserName, fileName, contentType, fileSize, width, height, duration, video, url, usedIn, createdAt, createdBy}]}. Errors follow the [shared conventions](https://epom.com/ad-server/docs/api.md#error-codes).

### GET /rest-api/media-library/assets/{assetId}.do

[Request examples](https://epom.com/ad-server/docs/api/media-library/get-media-library-assets-by-asset-id.md)

Get a media library file and where it is used.

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `assetId` | path | integer | yes | Media library file id |
| `usageLimit` | query | integer | no | Usages to list, at most 500 |

**Responses:** `200` — {success, asset:{...}, usagesTotal, usagesMore, usages:[{bannerId, bannerName, campaignId, campaignName, advertiserId, advertiserName}]} · `404` — No such file, it is deleted, or the user cannot see it. Errors follow the [shared conventions](https://epom.com/ad-server/docs/api.md#error-codes).

### POST /rest-api/media-library/assets/{assetId}/delete.do

[Request examples](https://epom.com/ad-server/docs/api/media-library/post-media-library-assets-delete.md)

Delete a media library file.

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `assetId` | path | integer | yes | Media library file id |

**Responses:** `200` — {success, assetId, usedIn} · `404` — No such file, it is already deleted, or the user cannot see it. Errors follow the [shared conventions](https://epom.com/ad-server/docs/api.md#error-codes).

### POST /rest-api/media-library/assets/{assetId}/update.do

[Request examples](https://epom.com/ad-server/docs/api/media-library/post-media-library-assets-update.md)

Rename or relabel a media library file.

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `assetId` | path | integer | yes | Media library file id |
| `name` | form | string | no | New display name, up to 255 characters |
| `advertiserId` | form | integer | no | New advertiser label; 0 removes it |

**Responses:** `200` — {success, asset:{...}} · `404` — No such file, it is deleted, or the user cannot see it. Errors follow the [shared conventions](https://epom.com/ad-server/docs/api.md#error-codes).

### POST /rest-api/media-library/assets/upload-from-url.do

[Request examples](https://epom.com/ad-server/docs/api/media-library/post-media-library-assets-upload-from-url.md)

Add a file to the media library by link.

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `url` | form | string | yes | Public http(s) link to the file |
| `advertiserId` | form | integer | no | Advertiser the file is for; a filter label |
| `name` | form | string | no | Display name; the file name when empty |

**Responses:** `200` — {success, duplicate, asset:{...}} · `404` — The advertiser does not exist or is deleted. Errors follow the [shared conventions](https://epom.com/ad-server/docs/api.md#error-codes).

### POST /rest-api/media-library/assets/upload.do

[Request examples](https://epom.com/ad-server/docs/api/media-library/post-media-library-assets-upload.md)

Upload a file to the media library.

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `advertiserId` | form | integer | no | Advertiser the file is for; a filter label |
| `name` | form | string | no | Display name; the file name when empty |

**Request body** (`multipart/form-data`, required): form with field `file` — The file: a video, an image or an HTML5 ZIP.

**Responses:** `200` — {success, duplicate, asset:{...}} · `404` — The advertiser does not exist or is deleted. Errors follow the [shared conventions](https://epom.com/ad-server/docs/api.md#error-codes).

## Related

- [REST API overview](https://epom.com/ad-server/docs/api.md) — authentication and conventions
- [API endpoint reference by tag](https://epom.com/ad-server/docs/api/endpoints.md)

<!-- Generated from the OpenAPI spec. Do not edit by hand. -->