---
title: "Update a workflow template"
method: PATCH
path: "/workspaces/{workspace_id}/templates/{template_id}"
tags: ["Workflow Templates"]
---

# Update a workflow template

`PATCH /workspaces/{workspace_id}/templates/{template_id}`

## Request

- Base URL: `https://app.mammoth.io/api/v2`
- URL: `https://app.mammoth.io/api/v2/workspaces/{workspace_id}/templates/{template_id}`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-KEY` and API key in header `X-API-SECRET` and API key in header `X-WORKSPACE-ID`

Update template fields.

## Path parameters

- `workspace_id` integer, required: Workspace refers to a collection of projects. Workspace ID is unique identifier for workspace.
- `template_id` integer, required

## Request body

- PatchTemplateRequest
  - `name` string, nullable
  - `description` string, nullable
  - `status` 'draft' | 'blueprint' | 'ready': Lifecycle status of a workflow template.
  - `save_preset` 'keep-all' | 'structure-only' | 'empty': How to handle data when instantiating a template.
  - `template_data` object, nullable
  - `endpoint_layers` object, nullable
  - `visibility` 'private' | 'project' | 'organization': Visibility scope: private | project | organization

## Response `200`

Request fulfilled, document follows

- TemplateResponse
  - `id` integer, required
  - `workspace_id` integer, required
  - `name` string, required
  - `description` string, nullable
  - `status` string, nullable
  - `save_preset` string, nullable
  - `template_data` object, nullable
  - `endpoint_layers` object, nullable
  - `visibility` string, nullable
  - `created_by` integer, nullable
  - `created_at` string, nullable
  - `updated_at` string, nullable

## Other responses

- `400`: Bad request syntax or unsupported method
- `404`: Nothing matches the given URI

---

[API](https://skmtc.dev/mammoth/apis/mammoth-analytics.md) · [All operations](https://skmtc.dev/mammoth/apis/mammoth-analytics/llms.txt) · [OpenAPI document](https://skmtc.dev/mammoth/apis/mammoth-analytics/revisions/4b2c943a00dc?raw)
