---
title: "Templates API endpoints"
description: "Endpoint reference for the Templates tag (18 endpoints): Creative template management"
type: "reference"
audience: [network-manager, admin]
keywords: [api, rest, endpoints, templates]
---

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.

# Templates API endpoints

Creative template management. 18 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.

### POST /rest-api/template-catalog/install.do

[Request examples](https://epom.com/ad-server/docs/api/templates/post-template-catalog-install.md)

Install a template from the public template library.

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `entryId` | form | string | yes | The library template's id, as the library list gives it |
| `update` | form | boolean | no | Replace an installed template with the library's newer build. Every banner using the template changes with it. |

**Responses:** `200` — Installed: success true, templateId, its properties · `404` — No such template in the library · `503` — The template library is not set up on this network or could not be read. Errors follow the [shared conventions](https://epom.com/ad-server/docs/api.md#error-codes).

### GET /rest-api/template-catalog/list.do

[Request examples](https://epom.com/ad-server/docs/api/templates/get-template-catalog-list.md)

List the public template library.

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `query` | query | string | no | Words that must all appear in a template's name, format, description, devices or placement type, e.g. "catfish mobile" |
| `placementType` | query | string | no | Only templates for this placement type Values: `SITE_PLACEMENT`, `NON_STANDARD_SITE_PLACEMENT`, `MOBILE_SITE_PLACEMENT`, `VIDEO_PLACEMENT`, `APPLICATION_PLACEMENT`, `EMAIL_PLACEMENT`, `CLICK_THROUGH_PLACEMENT`, `NATIVE_PLACEMENT`. |

**Responses:** `200` — The library's templates with their status on this network · `503` — The template library is not set up on this network or could not be read. Errors follow the [shared conventions](https://epom.com/ad-server/docs/api.md#error-codes).

### GET /rest-api/template-catalog/xml.do

[Request examples](https://epom.com/ad-server/docs/api/templates/get-template-catalog-xml.md)

Get a template's XML from the public template library.

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `entryId` | query | string | yes | The library template's id, as the library list gives it |

**Responses:** `200` — success true, entryId, name, uniqueId, buildVersion, placementType, templateType and xml (the template XML as text) · `404` — No such template in the library · `503` — The template library is not set up on this network, could not be read, or its copy does not match its catalog. Errors follow the [shared conventions](https://epom.com/ad-server/docs/api.md#error-codes).

### GET /rest-api/template/{templateId}/properties.do

[Request examples](https://epom.com/ad-server/docs/api/templates/get-template-properties.md)

Get template properties.

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `templateId` | path | integer | yes | Unique numeric identifier of the template whose properties should be retrieved |

**Responses:** `200` — List of template properties · `404` — Template not found. Errors follow the [shared conventions](https://epom.com/ad-server/docs/api.md#error-codes).

### POST /rest-api/template/delete.do

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

Delete template.

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | form | integer | no | ID of the template — omit on edit to create a new template; delete and export need it |
| `active` | form | boolean | no | Whether the template is active |
| `alwaysRedirect` | form | boolean | no | Whether the template always uses redirect mode for click tracking |
| `content` | form | string | no | Template HTML/JS content body |
| `global` | form | boolean | no | Whether this is a global (system-wide) template |
| `impressionRecordedByTemplate` | form | boolean | no | Whether impression tracking is handled by the template itself |
| `maxRequiredNativeAdsAmount` | form | integer | no | Maximum number of native ads supported by this template |
| `minRequiredNativeAdsAmount` | form | integer | no | Minimum number of native ads required by this template |
| `placementType` | form | string | no | Placement type this template applies to Values: `SITE_PLACEMENT`, `NON_STANDARD_SITE_PLACEMENT`, `MOBILE_SITE_PLACEMENT`, `VIDEO_PLACEMENT`, `APPLICATION_PLACEMENT`, `EMAIL_PLACEMENT`, `CLICK_THROUGH_PLACEMENT`, `NATIVE_PLACEMENT`. |
| `title` | form | string | no | Template title |
| `type` | form | string | no | Template type Values: `GENERAL`, `CONTENT_ADAPTER`, `PLACEMENT_CONTENT_ADAPTER`, `VIDEO_COMPANION`. |

**Responses:** `200` — Template deleted successfully. Errors follow the [shared conventions](https://epom.com/ad-server/docs/api.md#error-codes).

### GET /rest-api/template/edit.do

[Request examples](https://epom.com/ad-server/docs/api/templates/get-template-edit.md)

Get template by ID.

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | query | integer | no | ID of the template — omit on edit to create a new template; delete and export need it |
| `active` | query | boolean | no | Whether the template is active |
| `alwaysRedirect` | query | boolean | no | Whether the template always uses redirect mode for click tracking |
| `content` | query | string | no | Template HTML/JS content body |
| `global` | query | boolean | no | Whether this is a global (system-wide) template |
| `impressionRecordedByTemplate` | query | boolean | no | Whether impression tracking is handled by the template itself |
| `maxRequiredNativeAdsAmount` | query | integer | no | Maximum number of native ads supported by this template |
| `minRequiredNativeAdsAmount` | query | integer | no | Minimum number of native ads required by this template |
| `placementType` | query | string | no | Placement type this template applies to Values: `SITE_PLACEMENT`, `NON_STANDARD_SITE_PLACEMENT`, `MOBILE_SITE_PLACEMENT`, `VIDEO_PLACEMENT`, `APPLICATION_PLACEMENT`, `EMAIL_PLACEMENT`, `CLICK_THROUGH_PLACEMENT`, `NATIVE_PLACEMENT`. |
| `title` | query | string | no | Template title |
| `type` | query | string | no | Template type Values: `GENERAL`, `CONTENT_ADAPTER`, `PLACEMENT_CONTENT_ADAPTER`, `VIDEO_COMPANION`. |

**Responses:** `200` — Template details · `404` — Template not found. Errors follow the [shared conventions](https://epom.com/ad-server/docs/api.md#error-codes).

### POST /rest-api/template/edit.do

[Request examples](https://epom.com/ad-server/docs/api/templates/post-template-edit.md)

Create or update template.

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | form | integer | no | ID of the template — omit on edit to create a new template; delete and export need it |
| `active` | form | boolean | no | Whether the template is active |
| `alwaysRedirect` | form | boolean | no | Whether the template always uses redirect mode for click tracking |
| `content` | form | string | no | Template HTML/JS content body |
| `global` | form | boolean | no | Whether this is a global (system-wide) template |
| `impressionRecordedByTemplate` | form | boolean | no | Whether impression tracking is handled by the template itself |
| `maxRequiredNativeAdsAmount` | form | integer | no | Maximum number of native ads supported by this template |
| `minRequiredNativeAdsAmount` | form | integer | no | Minimum number of native ads required by this template |
| `placementType` | form | string | no | Placement type this template applies to Values: `SITE_PLACEMENT`, `NON_STANDARD_SITE_PLACEMENT`, `MOBILE_SITE_PLACEMENT`, `VIDEO_PLACEMENT`, `APPLICATION_PLACEMENT`, `EMAIL_PLACEMENT`, `CLICK_THROUGH_PLACEMENT`, `NATIVE_PLACEMENT`. |
| `title` | form | string | no | Template title |
| `type` | form | string | no | Template type Values: `GENERAL`, `CONTENT_ADAPTER`, `PLACEMENT_CONTENT_ADAPTER`, `VIDEO_COMPANION`. |

**Responses:** `200` — Template saved successfully. Errors follow the [shared conventions](https://epom.com/ad-server/docs/api.md#error-codes).

### GET /rest-api/template/export.do

[Request examples](https://epom.com/ad-server/docs/api/templates/get-template-export.md)

Export template as XML.

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | query | integer | no | ID of the template — omit on edit to create a new template; delete and export need it |
| `active` | query | boolean | no | Whether the template is active |
| `alwaysRedirect` | query | boolean | no | Whether the template always uses redirect mode for click tracking |
| `content` | query | string | no | Template HTML/JS content body |
| `global` | query | boolean | no | Whether this is a global (system-wide) template |
| `impressionRecordedByTemplate` | query | boolean | no | Whether impression tracking is handled by the template itself |
| `maxRequiredNativeAdsAmount` | query | integer | no | Maximum number of native ads supported by this template |
| `minRequiredNativeAdsAmount` | query | integer | no | Minimum number of native ads required by this template |
| `placementType` | query | string | no | Placement type this template applies to Values: `SITE_PLACEMENT`, `NON_STANDARD_SITE_PLACEMENT`, `MOBILE_SITE_PLACEMENT`, `VIDEO_PLACEMENT`, `APPLICATION_PLACEMENT`, `EMAIL_PLACEMENT`, `CLICK_THROUGH_PLACEMENT`, `NATIVE_PLACEMENT`. |
| `title` | query | string | no | Template title |
| `type` | query | string | no | Template type Values: `GENERAL`, `CONTENT_ADAPTER`, `PLACEMENT_CONTENT_ADAPTER`, `VIDEO_COMPANION`. |

**Responses:** `200` — XML file download. Errors follow the [shared conventions](https://epom.com/ad-server/docs/api.md#error-codes).

### POST /rest-api/template/import-as-new.do

[Request examples](https://epom.com/ad-server/docs/api/templates/post-template-import-as-new.md)

Import template as new.

**Request body** (`multipart/form-data`, required): form with field `file` — XML template file to import as new.

**Responses:** `200` — Template imported as new successfully. Errors follow the [shared conventions](https://epom.com/ad-server/docs/api.md#error-codes).

### POST /rest-api/template/import.do

[Request examples](https://epom.com/ad-server/docs/api/templates/post-template-import.md)

Import template from XML.

**Request body** (`multipart/form-data`, required): form with field `file` — XML template file to import.

**Responses:** `200` — Template imported successfully. Errors follow the [shared conventions](https://epom.com/ad-server/docs/api.md#error-codes).

### GET /rest-api/template/list.do

[Request examples](https://epom.com/ad-server/docs/api/templates/get-template-list.md)

List templates.

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `activeOnly` | query | boolean | no | When true, return only active (non-deleted) records |
| `dir` | query | string | no | Sort direction: ASC or DESC |
| `labels` | query | array&lt;integer&gt; | no | Filter by label IDs |
| `limit` | query | integer | no | Maximum number of records to return per page |
| `multisort` | query | array&lt;object&gt; | no | Multi-column sort configuration as a JSON array of objects with 'property' and 'direction' fields |
| `name` | query | string | no | Filter by entity name |
| `onlyData` | query | boolean | no | When true, return only data rows without metadata |
| `onlyTotal` | query | boolean | no | When true, return only the total count without data rows |
| `query` | query | string | no | Search query string to filter results by name or other searchable fields |
| `role` | query | integer | no | Filter by user role ID |
| `sort` | query | string | no | Field name to sort results by |
| `start` | query | integer | no | Pagination offset (0-based index of the first record to return) |

**Responses:** `200` — Paginated list of templates with permission flags. Errors follow the [shared conventions](https://epom.com/ad-server/docs/api.md#error-codes).

### POST /rest-api/template/template-file/delete.do

[Request examples](https://epom.com/ad-server/docs/api/templates/post-template-template-file-delete.md)

Delete template file.

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `templateId` | form | integer | yes | Unique numeric identifier of the template that contains the file to be deleted |
| `id` | form | integer | yes | Unique numeric identifier of the template file to delete |

**Responses:** `200` — Operation result with success status. Errors follow the [shared conventions](https://epom.com/ad-server/docs/api.md#error-codes).

### POST /rest-api/template/template-file/edit.do

[Request examples](https://epom.com/ad-server/docs/api/templates/post-template-template-file-edit.md)

Add template file.

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `templateId` | form | integer | yes | Unique numeric identifier of the template to add the file to |
| `key` | form | string | no | File key used in template content (format: $$KEY$$) |

**Request body** (`multipart/form-data`, required): form with field `commonsMultipartFile` — The file to upload, sent as the multipart/form-data part named commonsMultipartFile.

**Responses:** `200` — Operation result with success status. Errors follow the [shared conventions](https://epom.com/ad-server/docs/api.md#error-codes).

### GET /rest-api/template/template-file/list.do

[Request examples](https://epom.com/ad-server/docs/api/templates/get-template-template-file-list.md)

List template files.

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `templateId` | query | integer | yes | Unique numeric identifier of the template whose files should be listed |

**Responses:** `200` — List of template files. Errors follow the [shared conventions](https://epom.com/ad-server/docs/api.md#error-codes).

### POST /rest-api/template/template-property/delete.do

[Request examples](https://epom.com/ad-server/docs/api/templates/post-template-template-property-delete.md)

Delete template property.

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `templateId` | form | integer | yes | Unique numeric identifier of the template that contains the property to be deleted |
| `id` | form | integer | yes | Unique numeric identifier of the template property to delete |

**Responses:** `200` — Operation result with success status. Errors follow the [shared conventions](https://epom.com/ad-server/docs/api.md#error-codes).

### POST /rest-api/template/template-property/edit.do

[Request examples](https://epom.com/ad-server/docs/api/templates/post-template-template-property-edit.md)

Add or edit template property.

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `templateId` | form | integer | yes | Unique numeric identifier of the template to add the property to or that contains the property being edited |
| `type` | form | string | no | Type of the property to create (default FILE) — ignored when propertyId names an existing property Values: `FILE`, `STRING`, `INTEGER`, `BOOLEAN`, `SELECT`, `PLACEMENT_KEY`, `HTML5_ZIP`. |
| `propertyId` | form | integer | no | ID of the template property to edit — omit to create a new one |
| `key` | form | string | no | Property key used in template content (format: $$KEY$$); the platform's own macro names, such as $$CLICK_URL$$, are reserved and refused |
| `moderation` | form | boolean | no | Whether this property requires moderation approval |
| `order` | form | integer | no | Display order of this property in the form |
| `required` | form | boolean | no | Whether this property is required when creating a banner |
| `title` | form | string | no | Property display title |

**Responses:** `200` — Operation result with success status · `404` — propertyId names a property of another template. Errors follow the [shared conventions](https://epom.com/ad-server/docs/api.md#error-codes).

### GET /rest-api/template/template-property/list.do

[Request examples](https://epom.com/ad-server/docs/api/templates/get-template-template-property-list.md)

List template properties.

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `templateId` | query | integer | yes | Unique numeric identifier of the template whose properties should be listed |

**Responses:** `200` — List of template properties. Errors follow the [shared conventions](https://epom.com/ad-server/docs/api.md#error-codes).

### POST /rest-api/template/template-property/order.do

[Request examples](https://epom.com/ad-server/docs/api/templates/post-template-template-property-order.md)

Change property order.

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `templateId` | form | integer | yes | Unique numeric identifier of the template containing the property |
| `propertyId` | form | integer | yes | Unique numeric identifier of the template property to reposition |
| `order` | form | integer | yes | New zero-based position index where the property should be placed in the ordered list, from 0 to the number of the template's properties minus one |

**Responses:** `200` — Operation result with success status. 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)
- [Network services and miscellaneous APIs](https://epom.com/ad-server/docs/api/network-and-misc.md)

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