---
title: "Add or edit template property"
type: reference
method: POST
path: /rest-api/template/template-property/edit.do
tag: "Templates"
---

# Add or edit template property

`POST https://YOUR-NETWORK-DOMAIN/rest-api/template/template-property/edit.do`

Creates a new template property or updates an existing one within the specified template. The property type determines which fields are applicable: FILE properties support allowedContentTypes, STRING properties support url/multiline/maxLength validation, INTEGER properties support minValue/maxValue/step, SELECT properties support key-value pairs and an optional 'Please Select' option, and BOOLEAN/PLACEMENT_KEY have no extra configuration. The macro key must be unique within the template and must not conflict with reserved system macros or existing file keys. The template version is incremented after the property is saved. Requires edit permission on the template; a refused call saves nothing.

## Form params

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

## Responses

- `200` — Operation result with success status
- `400` — Bad request — invalid or missing parameters
- `401` — Authentication error
- `403` — Forbidden — insufficient permissions
- `404` — propertyId names a property of another template

## Example request

```bash
curl --request POST \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/template/template-property/edit.do' \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'templateId=300' \
  --data-urlencode 'type=STRING' \
  --data-urlencode 'propertyId=40' \
  --data-urlencode 'key=$$HEADLINE$$'
```

Source: https://epom.com/ad-server/docs/api/templates/post-template-template-property-edit