---
title: "Enable a source template"
method: POST
path: "/api/v2/customSourcePacks/enableTemplate"
tags: ["Custom Source Packs"]
---

# Enable a source template

`POST /api/v2/customSourcePacks/enableTemplate`

## Request

- Base URL: `https://zeropath.com`
- URL: `https://zeropath.com/api/v2/customSourcePacks/enableTemplate`
- Auth: API key in header `X-ZeroPath-API-Token-Id` and API key in header `X-ZeroPath-API-Token-Secret`

Enable a single source template from a pack. Interpolates parameter placeholders, creates a CustomSourceDeclaration, and records the activation.

## Request body

- EnableCustomSourceTemplateInput
  - `organizationId` string, required
  - `templateId` string, required: The template to enable
  - `parameterValues` object: Values for template parameter placeholders
  - `globPattern` string: Glob pattern for files this source applies to
  - `sourceTypes` string[]: Source types this declaration applies to
  - `repositoryIds` string[]: Repository IDs to restrict this source to. When empty, applies org-wide.

## Response `200`

Template enabled successfully

- EnableCustomSourceTemplateResponse
  - `instanceId` string, required
  - `declarationId` string, required

## Other responses

- `400`: Error Response
- `401`: Error Response
- `404`: Error Response

---

[API](https://skmtc.dev/zeropath/apis/zeropath-api.md) - [All operations](https://skmtc.dev/zeropath/apis/zeropath-api/llms.txt) - [OpenAPI document](https://skmtc.dev/zeropath/apis/zeropath-api/revisions/126e9c80ba0d?raw)
