> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Template V1

> Update description and/or defaults on a tenant-owned template…

Update description and/or defaults on a tenant-owned template.

The template `name` is immutable — to rename, delete and re-create
(which intentionally orphans referencing job rows from the old name).
Built-in templates cannot be modified.

### Path parameters

<ParamField path="name" type="string" required />

### Request body

`UpdateTemplateRequest`

<ParamField body="description" type="string,null">
  New description; omit to leave unchanged.
</ParamField>

<ParamField body="defaults" type="object,null">
  New defaults dict. Replaces the entire defaults blob — pass the merged result, not a partial. Omit to leave unchanged.
</ParamField>

### Response

`TemplateInfo`

<ResponseField name="name" type="string" required>
  The exact string to pass as `agent_type` on /trigger.
</ResponseField>

<ResponseField name="kind" type="string" required>
  `builtin` ships with the platform; `tenant` is owned by your org.
</ResponseField>

<ResponseField name="description" type="string,null">
  Human-readable description (tenant templates only).
</ResponseField>

### Status codes

| Code  | Meaning             |
| ----- | ------------------- |
| `200` | Successful Response |
| `422` | Validation Error    |

<RequestExample>
  ```bash cURL theme={null}
  curl --request PATCH \
    --url 'https://api.computer.stateset.app/api/v1/templates/{name}' \
    --header 'X-API-Key: YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "description": "Two-person tent, green — replacement for damaged pole set.",
    "defaults": {}
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "name": "Two-Person Tent",
    "kind": "builtin",
    "description": "Two-person tent, green — replacement for damaged pole set."
  }
  ```
</ResponseExample>
