# PATCH /spreadsheets/templates/:id

**Resource:** [Spreadsheets](./spreadsheets.md)  
**Scopes:** `spreadsheets:write`  
**Write operation:** yes

Update a spreadsheet template. columns is a FULL REPLACEMENT -- include all existing columns with their current id to preserve them. To remove a column without losing row data, set archived: true. Changing columns does not modify existing row data. Same data_type values and option shapes as POST.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `id` | path | uuid | yes | Template ID |
| `name` | body | string | no | Template name |
| `description` | body | string | no | Template description |
| `columns` | body | array | no | FULL REPLACEMENT column set. Include id on existing columns to update them; omit id to create a new column. Each: { id?: string, header: string, data_type: "text"\|"long_text"\|"number"\|"date"\|"boolean"\|"dropdown"\|"user_ref"\|"opportunity_ref", options?: Array<string \| { value: string, color?: palette-key }>, archived?: true }. |
| `default_sort` | body | array | no | Default ordering. Array of { column: string, direction: "asc"\|"desc" }. Pass null to clear. |
| `merge_rules` | body | object | no | Merge-on-insert config (or null to clear). |
| `is_archived` | body | boolean | no | Archive or unarchive |

---
Base URL: `https://api.trustpager.com/functions/v1/api/v1` — Auth: `Authorization: Bearer YOUR_API_KEY`