---
title: "Create Policy From Template"
method: POST
path: "/api/policies/from-template"
tags: ["policies"]
---

# Create Policy From Template

`POST /api/policies/from-template`

## Request

- Base URL: `https://www.gateco.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://www.gateco.ai/api/policies/from-template`
- Auth: OAuth 2 (password, token URL `/api/auth/login`)

Instantiate a policy template and persist it as a new draft policy.

Requires the ``policy_studio`` feature (Team+).  Placeholder values are
substituted into the template before the policy is created, so the caller
never touches raw rule structures.

## Request body

- CreateFromTemplateRequest: Request body for ``POST /api/policies/from-template``. Attributes: template_id: ID of the template to instantiate (e.g., ``"group_rbac"``). placeholder_values: Mapping of placeholder key to substitution string. name: Optional override for the rendered policy name.
  - `template_id` string, required
  - `placeholder_values` object, required
  - `name` string, nullable

## Response `201`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/gateco/apis/gateco-api.md) · [All operations](https://skmtc.dev/gateco/apis/gateco-api/llms.txt) · [OpenAPI document](https://skmtc.dev/gateco/apis/gateco-api/revisions/5debaf204950?raw)
