---
title: "Get template by ID"
type: reference
method: GET
path: /rest-api/template/edit.do
tag: "Templates"
---

# Get template by ID

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

Returns the full details of a creative template including its metadata (title, placement type, active status, template type), the raw template content markup, the list of uploaded template files with checksums and content types, and all defined template properties with their configurations. The response also includes the caller's share type on the template (IS_OWNER, CAN_EDIT, or CAN_VIEW). Returns a notFound flag if the template does not exist. Requires VIEW permission on the template through ownership or sharing.

## Query params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `id` | integer | no | `12` | ID of the template — omit on edit to create a new template; delete and export need it |
| `active` | boolean | no | `true` | Whether the template is active |
| `alwaysRedirect` | boolean | no | `false` | Whether the template always uses redirect mode for click tracking |
| `content` | string | no | `<div>{{BANNER}}</div>` | Template HTML/JS content body |
| `global` | boolean | no | `false` | Whether this is a global (system-wide) template |
| `impressionRecordedByTemplate` | boolean | no | `false` | Whether impression tracking is handled by the template itself |
| `maxRequiredNativeAdsAmount` | integer | no | `1` | Maximum number of native ads supported by this template |
| `minRequiredNativeAdsAmount` | integer | no | `1` | Minimum number of native ads required by this template |
| `placementType` | string | no | `SITE_PLACEMENT` | Placement type this template applies to |
| `title` | string | no | `Standard Banner 300x250` | Template title |
| `type` | string | no | `GENERAL` | Template type |

## Responses

- `200` — Template details
- `400` — Bad request — invalid or missing parameters
- `401` — Authentication error
- `403` — Insufficient permissions
- `404` — Template not found

## Example request

```bash
curl --request GET \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/template/edit.do?id=12&placementType=SITE_PLACEMENT&type=GENERAL&active=true' \
  --header 'X-Api-Key: YOUR_API_KEY'
```

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