---
title: "Get a template's file"
method: POST
path: "/templates/{id}/file"
tags: ["templates"]
---

# Get a template's file

`POST /templates/{id}/file`

Get a template's file
**Access policy**: authenticated

## Path parameters

- `id` integer, required

## Response `200`

Success

- TemplatesFileResponse
  - `FileContent` string — The requested file content

## Other responses

- `400` — Invalid request
- `500` — Server error

---

[API](https://skmtc.net/portainer/apis/portainerce-api.md) · [All operations](https://skmtc.net/portainer/apis/portainerce-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/portainer/portainerce-api/versions/ec51a8194ac0/schema)
