---
title: "Get Template stack file content."
method: GET
path: "/custom_templates/{id}/file"
tags: ["custom_templates"]
---

# Get Template stack file content.

`GET /custom_templates/{id}/file`

Retrieve the content of the Stack file for the specified custom template
**Access policy**: authenticated

## Path parameters

- `id` integer, required

## Response `200`

Success

- CustomtemplatesFileResponse
  - `FileContent` string

## Other responses

- `400` — Invalid request
- `404` — Custom template not found
- `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/c0b0975cd11b/schema)
