---
title: "Export template as XML"
type: reference
method: GET
path: /rest-api/template/export.do
tag: "Templates"
---

# Export template as XML

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

Exports a creative template as an XML file download. The XML includes the full template definition with content, properties, and files metadata. Requires VIEW permission on the template.

## 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` — XML file download
- `400` — Bad request — invalid or missing parameters
- `401` — Authentication error
- `403` — Insufficient permissions

## Example request

```bash
curl --request GET \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/template/export.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-export