---
title: "Run a template"
method: POST
path: "/v1/templates/run"
tags: ["Templates"]
---

# Run a template

`POST /v1/templates/run`

Run template attach on a Case.

---

#### See also  
Learn more about [Templates](./templates-guide)  
Learn more about [Cases](./cases-guide)

## Request body

- RunTemplate
  - `case_id` string, uuid, required — Case id where to run the template
  - `template_key` string — Optional template key to change the case template
  - `template_id` string, uuid — Prefer using `template_key` instead. Optional template id to change the case template. Cannot be set at the same time as `template_key`.

## Response `201`

**ℹ️ Click to see full payload**

- TemplateExecution
  - `case_id` string, uuid, required
  - `company_ids` string[], required
  - `individual_ids` string[], required

## Other responses

- `400` — The request is either malformed or contain invalid parameters. - Make sure the body payload matches the expected schema

---

[API](https://skmtc.dev/dotfile/apis/api-specifications.md) · [All operations](https://skmtc.dev/dotfile/apis/api-specifications/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/dotfile/api-specifications/revisions/36393567057b/schema)
