---
title: "Fetch the latest config file content based on custom template's git repository configuration"
method: PUT
path: "/custom_templates/{id}/git_fetch"
tags: ["custom_templates"]
---

# Fetch the latest config file content based on custom template's git repository configuration

`PUT /custom_templates/{id}/git_fetch`

Retrieve details about a template created from git repository method.
**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)
