---
title: "Import template from XML"
type: reference
method: POST
path: /rest-api/template/import.do
tag: "Templates"
---

# Import template from XML

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

Imports a creative template from an XML file. The XML must follow the template export format. If the template ID in the XML matches an existing template, it will be overwritten. Requires appropriate CREATE or UPDATE permissions on templates.

## Body

A multipart form: `file` (file).

## Responses

- `200` — Template imported successfully
- `400` — Bad request — invalid or missing parameters
- `401` — Authentication error
- `403` — Insufficient permissions

## Example request

```bash
curl --request POST \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/template/import.do' \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --form 'file=@template.xml'
```

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