Browse the help center

Templates API endpoints

Endpoint reference for the Templates tag (18 endpoints): Creative template management

Reference network manager admin

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. Parameters marked form go in an application/x-www-form-urlencoded request body.

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

Request examples

Install a template from the public template library.

ParameterInTypeRequiredDescription
entryIdformstringyesThe library template’s id, as the library list gives it
updateformbooleannoReplace 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.

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

Request examples

List the public template library.

ParameterInTypeRequiredDescription
queryquerystringnoWords that must all appear in a template’s name, format, description, devices or placement type, e.g. “catfish mobile”
placementTypequerystringnoOnly 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.

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

Request examples

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

ParameterInTypeRequiredDescription
entryIdquerystringyesThe 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.

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

Request examples

Get template properties.

ParameterInTypeRequiredDescription
templateIdpathintegeryesUnique 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.

POST /rest-api/template/delete.do

Request examples

Delete template.

ParameterInTypeRequiredDescription
idformintegernoID of the template — omit on edit to create a new template; delete and export need it
activeformbooleannoWhether the template is active
alwaysRedirectformbooleannoWhether the template always uses redirect mode for click tracking
contentformstringnoTemplate HTML/JS content body
globalformbooleannoWhether this is a global (system-wide) template
impressionRecordedByTemplateformbooleannoWhether impression tracking is handled by the template itself
maxRequiredNativeAdsAmountformintegernoMaximum number of native ads supported by this template
minRequiredNativeAdsAmountformintegernoMinimum number of native ads required by this template
placementTypeformstringnoPlacement 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.
titleformstringnoTemplate title
typeformstringnoTemplate type Values: GENERAL, CONTENT_ADAPTER, PLACEMENT_CONTENT_ADAPTER, VIDEO_COMPANION.

Responses: 200 — Template deleted successfully. Errors follow the shared conventions.

GET /rest-api/template/edit.do

Request examples

Get template by ID.

ParameterInTypeRequiredDescription
idqueryintegernoID of the template — omit on edit to create a new template; delete and export need it
activequerybooleannoWhether the template is active
alwaysRedirectquerybooleannoWhether the template always uses redirect mode for click tracking
contentquerystringnoTemplate HTML/JS content body
globalquerybooleannoWhether this is a global (system-wide) template
impressionRecordedByTemplatequerybooleannoWhether impression tracking is handled by the template itself
maxRequiredNativeAdsAmountqueryintegernoMaximum number of native ads supported by this template
minRequiredNativeAdsAmountqueryintegernoMinimum number of native ads required by this template
placementTypequerystringnoPlacement 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.
titlequerystringnoTemplate title
typequerystringnoTemplate type Values: GENERAL, CONTENT_ADAPTER, PLACEMENT_CONTENT_ADAPTER, VIDEO_COMPANION.

Responses: 200 — Template details · 404 — Template not found. Errors follow the shared conventions.

POST /rest-api/template/edit.do

Request examples

Create or update template.

ParameterInTypeRequiredDescription
idformintegernoID of the template — omit on edit to create a new template; delete and export need it
activeformbooleannoWhether the template is active
alwaysRedirectformbooleannoWhether the template always uses redirect mode for click tracking
contentformstringnoTemplate HTML/JS content body
globalformbooleannoWhether this is a global (system-wide) template
impressionRecordedByTemplateformbooleannoWhether impression tracking is handled by the template itself
maxRequiredNativeAdsAmountformintegernoMaximum number of native ads supported by this template
minRequiredNativeAdsAmountformintegernoMinimum number of native ads required by this template
placementTypeformstringnoPlacement 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.
titleformstringnoTemplate title
typeformstringnoTemplate type Values: GENERAL, CONTENT_ADAPTER, PLACEMENT_CONTENT_ADAPTER, VIDEO_COMPANION.

Responses: 200 — Template saved successfully. Errors follow the shared conventions.

GET /rest-api/template/export.do

Request examples

Export template as XML.

ParameterInTypeRequiredDescription
idqueryintegernoID of the template — omit on edit to create a new template; delete and export need it
activequerybooleannoWhether the template is active
alwaysRedirectquerybooleannoWhether the template always uses redirect mode for click tracking
contentquerystringnoTemplate HTML/JS content body
globalquerybooleannoWhether this is a global (system-wide) template
impressionRecordedByTemplatequerybooleannoWhether impression tracking is handled by the template itself
maxRequiredNativeAdsAmountqueryintegernoMaximum number of native ads supported by this template
minRequiredNativeAdsAmountqueryintegernoMinimum number of native ads required by this template
placementTypequerystringnoPlacement 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.
titlequerystringnoTemplate title
typequerystringnoTemplate type Values: GENERAL, CONTENT_ADAPTER, PLACEMENT_CONTENT_ADAPTER, VIDEO_COMPANION.

Responses: 200 — XML file download. Errors follow the shared conventions.

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

Request examples

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.

POST /rest-api/template/import.do

Request examples

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.

GET /rest-api/template/list.do

Request examples

List templates.

ParameterInTypeRequiredDescription
activeOnlyquerybooleannoWhen true, return only active (non-deleted) records
dirquerystringnoSort direction: ASC or DESC
labelsqueryarray<integer>noFilter by label IDs
limitqueryintegernoMaximum number of records to return per page
multisortqueryarray<object>noMulti-column sort configuration as a JSON array of objects with ‘property’ and ‘direction’ fields
namequerystringnoFilter by entity name
onlyDataquerybooleannoWhen true, return only data rows without metadata
onlyTotalquerybooleannoWhen true, return only the total count without data rows
queryquerystringnoSearch query string to filter results by name or other searchable fields
rolequeryintegernoFilter by user role ID
sortquerystringnoField name to sort results by
startqueryintegernoPagination offset (0-based index of the first record to return)

Responses: 200 — Paginated list of templates with permission flags. Errors follow the shared conventions.

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

Request examples

Delete template file.

ParameterInTypeRequiredDescription
templateIdformintegeryesUnique numeric identifier of the template that contains the file to be deleted
idformintegeryesUnique numeric identifier of the template file to delete

Responses: 200 — Operation result with success status. Errors follow the shared conventions.

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

Request examples

Add template file.

ParameterInTypeRequiredDescription
templateIdformintegeryesUnique numeric identifier of the template to add the file to
keyformstringnoFile 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.

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

Request examples

List template files.

ParameterInTypeRequiredDescription
templateIdqueryintegeryesUnique numeric identifier of the template whose files should be listed

Responses: 200 — List of template files. Errors follow the shared conventions.

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

Request examples

Delete template property.

ParameterInTypeRequiredDescription
templateIdformintegeryesUnique numeric identifier of the template that contains the property to be deleted
idformintegeryesUnique numeric identifier of the template property to delete

Responses: 200 — Operation result with success status. Errors follow the shared conventions.

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

Request examples

Add or edit template property.

ParameterInTypeRequiredDescription
templateIdformintegeryesUnique numeric identifier of the template to add the property to or that contains the property being edited
typeformstringnoType of the property to create (default FILE) — ignored when propertyId names an existing property Values: FILE, STRING, INTEGER, BOOLEAN, SELECT, PLACEMENT_KEY, HTML5_ZIP.
propertyIdformintegernoID of the template property to edit — omit to create a new one
keyformstringnoProperty key used in template content (format: $$KEY$$); the platform’s own macro names, such as $$CLICK_URL$$, are reserved and refused
moderationformbooleannoWhether this property requires moderation approval
orderformintegernoDisplay order of this property in the form
requiredformbooleannoWhether this property is required when creating a banner
titleformstringnoProperty display title

Responses: 200 — Operation result with success status · 404 — propertyId names a property of another template. Errors follow the shared conventions.

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

Request examples

List template properties.

ParameterInTypeRequiredDescription
templateIdqueryintegeryesUnique numeric identifier of the template whose properties should be listed

Responses: 200 — List of template properties. Errors follow the shared conventions.

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

Request examples

Change property order.

ParameterInTypeRequiredDescription
templateIdformintegeryesUnique numeric identifier of the template containing the property
propertyIdformintegeryesUnique numeric identifier of the template property to reposition
orderformintegeryesNew 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.

Related pages

Please disable Adblock
Are you using adblock? Disable it and reload the page to proceed to the destination page.

A registration has already been submitted from this page. Please try again in 10 minutes.