---
title: "Apply template update"
method: POST
path: "/v4/templates/{templateId}/apply"
tags: ["Templates"]
---

# Apply template update

`POST /v4/templates/{templateId}/apply`

## Request

- Base URL: `https://api.kadoa.com`
- URL: `https://api.kadoa.com/v4/templates/{templateId}/apply`
- Auth: API key in header `x-api-key`

Apply a template version's config to existing workflows (clone with lineage update)

## Path parameters

- `templateId` string, uuid, required

## Request body

- ApplyTemplateUpdateBody: Request body for applying a template version update to existing workflows
  - `targetVersion` integer, required: Template version to apply
  - `workflowIds` string[], required: Workflow IDs to update (max 2000)

## Response `200`

200

- ApplyTemplateUpdateResponse: Response for template update application
  - `error` false, required: Error flag (always false on success)
  - `success` true, required: Success flag
  - `updatedCount` number, required: Number of workflows updated
  - `workflowIds` string[], required: IDs of updated workflows
  - `controlledParts` object, required: Which workflow parts were updated by this template version
    - `prompt` boolean, required: Whether the template controlled the prompt
    - `schema` boolean, required: Whether the template controlled the schema
    - `schemaValidationRules` boolean, required: Whether the template controlled the schema validation rules
    - `notifications` boolean, required: Whether the template controlled notifications
    - `frequency` boolean, required: Whether the template controlled the frequency

## Other responses

- `400`: 400
- `401`: 401
- `404`: 404
- `500`: 500

---

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