---
title: "Set a template banner's property values"
type: reference
method: POST
path: /rest-api/banner/{bannerId}/template-properties.do
tag: "Banners"
---

# Set a template banner's property values

`POST https://YOUR-NETWORK-DOMAIN/rest-api/banner/{bannerId}/template-properties.do`

Changes some property values of a TEMPLATE banner and keeps the rest. The JSON body maps each property to its new value, e.g. {"$$PARENT_SELECTOR$$": "#player", "$$INSERTION_TYPE$$": "after"}; a property is named by its key, with or without the $$ around it, or by its title. A SELECT takes one of its options' values, a BOOLEAN true or false, an INTEGER a whole number within its min and max, a STRING what the banner edit accepts (its length, a valid URL where it is a URL); an empty string clears an optional value. The values are checked as the banner edit checks them, and nothing is saved when one is refused. FILE and HTML5_ZIP properties are not set here: send fileUrl[<key>] or html5ZipUrl[<key>] to /rest-api/banner/{bannerId}/update.do. A change to a property under moderation can send the banner back for approval, as in the console. Answers the properties as the GET does. Requires UPDATE permission on the banner's advertiser and, while the template is inactive, the UPDATE_PROPERTIES_OF_INACTIVE_TEMPLATE permission.

## Path params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `bannerId` | integer | yes | `3001` | ID of the TEMPLATE banner |

## Body

A JSON body. An example, built from the field definitions:

```json
{}
```

## Responses

- `200` — Saved; the template and its properties with the banner's new values
- `400` — Not a TEMPLATE banner, no values, an unknown property (the message lists the valid keys), a file property, or a value the property refuses (errors by key)
- `401` — Authentication error
- `403` — Not enough permissions
- `404` — Banner not found or deleted

## Example request

```bash
curl --request POST \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/banner/3001/template-properties.do' \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "$$PARENT_SELECTOR$$": "#player",
  "$$INSERTION_TYPE$$": "after"
}'
```

Source: https://epom.com/ad-server/docs/api/banners/post-banner-template-properties