asksteps: replace the content of a message template
asksteps_update_message_templateChanges a message template. Requires "automation:write". IMPORTANT: this REPLACES the content completely — call asksteps_get_message_template first, change what the user asked for, send the content back whole and pass its updatedAt as expected_updated_at: if someone changed the template in the meantime the answer is "stale" and nothing is overwritten. A template with an "html" block is refused ("not_editable"). A template that an active workflow or an active or paused process sends from can only be changed with the account's mandate "activate": without it the answer is "confirmation_required", NOTHING was written, and you hand the user the url. The channel cannot be changed.
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": {
"template_id": "<template_id>",
"expected_updated_at": "<expected_updated_at>",
"spec": "<spec>"
},
"name": "asksteps_update_message_template"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spec | Yes | The new template. name, category, defaultLocale and attachIcs stay when omitted; content replaces the stored content. | |
| template_id | Yes | The template id. | |
| expected_updated_at | Yes | The updatedAt value of asksteps_get_message_template (or of your last change). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Path of the editor in the asksteps studio. | |
| note | Yes | One or two sentences for the user. | |
| spec | No | The template as saved — after cleaning (for example a dangerous link target removed). Check it against what you meant to send. | |
| issues | No | The problems found, with path and code (and the shortcode when it is one). Empty unless status is "invalid". | |
| status | Yes | Outcome. One of: "created" (not used by any workflow or process yet, so nothing is sent), "updated", "invalid" (the issues say exactly what to fix; nothing was saved), "stale" (the template was changed since you read it: read it again and redo the change), "not_editable" (it contains an html block), "confirmation_required" (a workflow or process in use sends from it and the account has not authorised an agent to change it: NOTHING was written, give the user the url), "limit_reached" (the account holds the maximum number of templates), "rate_limited" (too many changes to live objects in the last minute), "not_found", "not_connected", "error". Authorisation can also refuse before the tool runs: "plan_required" (the account's plan does not include agent access), "not_enabled" (the account owner has not switched agent access on), "permission_denied" (the connected user's role lacks the permission; the note names it), "mandate_required" (the owner has not granted a mandate for this). The note then says what the user has to do. | |
| inLiveUse | No | Whether an active workflow or an active or paused process sends from this template. | |
| updatedAt | No | Pass this value as expected_updated_at to the next change. | |
| templateId | No | The id of the template. |