Update template draft
update_template_draftReplace a template's draft (PATCH /templates/{id}; write scope). This is a full replacement, not a partial patch: pass content, logTitle, logDescription and paramOverrides as they should end up (get_template first). name, folder and channelKind are required for validation but not changed (channelKind must equal the original). Live sends keep using the published version until you publish, either with publish: true here or publish_template. Fails on archived templates.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Template name, unique per workspace (archived templates included). | |
| folder | No | Optional folder path for organisation, e.g. "billing". | |
| content | Yes | Channel-shaped template body; the shape is fixed by `channelKind`: email_html → `{ subject, bodyHtml, bodyText }`; fcm_basic → `{ title, body, imageUrl?, data?: { [key]: string } }`; slack_text → `{ text }`; discord_text → `{ content }` (max 2000 chars); telegram_text → `{ text, disableLinkPreview? }`; webhook_json → `{ title, body, data?: { [key]: string } }`. Use `{{name}}` placeholders and `{{#items}}…{{/items}}` sections; the required params are derived from them automatically. | |
| publish | No | true = publish this version immediately so sends by templateId use it. Default false (saved as draft). | |
| logTitle | Yes | Short title shown in the in-app feed and delivery logs, e.g. "Invoice {{number}} is due". Placeholders allowed. | |
| templateId | Yes | The template id (UUID). | |
| channelKind | Yes | Which channel family the template renders for. Must match the `templateKind` of the channels you will send through (list_channels). Can't be changed after creation. | |
| logDescription | Yes | One-line description for the in-app feed and delivery logs. Placeholders allowed. | |
| paramOverrides | No | Per-param metadata keyed by param name: `{ optional?: boolean, description?: string }`. Mark a placeholder optional so sends may omit it. |