---
title: "Link workflows to template"
method: POST
path: "/v4/templates/{templateId}/link"
tags: ["Templates"]
---

# Link workflows to template

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

## Request

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

Associate existing workflows with this template at the latest version. Returns 409 with conflict details if workflows are linked to another template (use force: true to override).

## Path parameters

- `templateId` string, uuid, required

## Request body

- LinkWorkflowsBody: Request body for linking workflows to a template
  - `workflowIds` string[], required: Workflow IDs to link to this template
  - `force` boolean: If true, relink workflows that are already linked to another template

## Response `200`

200

- LinkWorkflowsResponse: Response for linking workflows to a template
  - `error` false, required: Error flag (always false on success)
  - `success` true, required: Success flag
  - `linkedCount` number, required: Number of workflows linked
  - `workflowIds` string[], required: IDs of linked workflows

## Other responses

- `400`: 400
- `401`: 401
- `404`: 404
- `409`: 409
- `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)
