---
title: "List template files"
type: reference
method: GET
path: /rest-api/template/template-file/list.do
tag: "Templates"
---

# List template files

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

Returns the list of all files attached to the specified template, including each file's ID, macro key, MD5 checksum, file size in bytes, original filename, and MIME content type. The response is a SearchResult wrapper containing a 'data' array of file objects and a 'total' count. Returns an empty list if the template does not exist or if the caller lacks VIEW permission. Requires VIEW permission on the template through ownership or sharing.

## Query params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `templateId` | integer | yes | `300` | Unique numeric identifier of the template whose files should be listed |

## Responses

- `200` — List of template files
- `400` — Bad request — invalid or missing parameters
- `401` — Authentication error
- `403` — Forbidden — insufficient permissions

## Example request

```bash
curl --request GET \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/template/template-file/list.do?templateId=300' \
  --header 'X-Api-Key: YOUR_API_KEY'
```

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