Create template
create_templateCreate a template (POST /templates; write scope). channelKind is permanent and must match the channels you'll send through (list_channels templateKind). It is saved as an unpublished draft unless publish: true; sending by templateId needs a published version (publish_template). Names are unique per workspace including archived templates: a collision returns 409, so unarchive_template the old one instead. Returns { id, requiredParams }. Designed (drag-and-drop) email templates can only be made in the dashboard.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>",
"channelKind": "<channelKind>",
"content": "<content>",
"logTitle": "<logTitle>",
"logDescription": "<logDescription>"
},
"name": "create_template"
}
}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? }`; sms_text → `{ text }` (plain text, max 1600; long text is split into several billed SMS — on sendsms_mn into parts of 159 plain-Latin / 69 Cyrillic chars); 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. | |
| 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. |