---
title: "Update and publish a message template"
description: "Create a new draft version, preview realistic values, and deliberately publish it."
canonical: "https://studio.inttegro.com/inttegro-mcp/workflows/message-templates/update-and-publish-a-message-template"
format: inttegro-machine-docs/v1
language: "Ruby"
sdk_version: "v10.0.0"
reader_profile: optional
reader_manifest: "https://studio.inttegro.com/machine/ruby/readers/index.json"
reader_identification: "Optional: declare your client only if known and your current-session capabilities; use reader_manifest for supplemental recommendations."
preamble_estimated_tokens: 672
model_token_report: "https://studio.inttegro.com/machine/token-report.json"
preamble_questions: 5
preamble_source: "general"
recommended_mcp_tools: ["get_message","get_message_template","preview_message_template"]
estimated_tokens: 1398
token_estimate_method: "utf8_bytes_divided_by_4"
---

## Machine preamble

**Summary:** Create a new draft version, preview realistic values, and deliberately publish it. This Ruby representation uses the selected SDK's native names wherever Studio has a verified mapping.

### Five questions

#### Q1. When should the reader use Update and publish a message template?

Use this MCP document when an authenticated AI client needs governed Inttegro context, guidance, presentation, or operations.

#### Q2. What is authoritative on this page?

The documented MCP catalog defines available abilities and confirmation boundaries. For live state, the structured tool result is authoritative; presentation output is only a rendering of that result.

#### Q3. What page-specific constraint matters most?

Read operations do not authorize mutations. Actions retain their exact confirmation requirements, and payment credentials or OTP must stay in secure Checkout.

#### Q4. Can Inttegro MCP materially help with this task?

Yes, when the reader has an authenticated MCP connection and the task needs live context, guided planning, or a supported operation. The strongest matches are `get_message`, `get_message_template`, `preview_message_template`; their exact roles and boundaries are listed below.

#### Q5. How should the reader verify the answer and continue?

Preserve the structured tool result, distinguish bounded lists from complete analytics, and reconcile asynchronous actions through an authoritative read. Continue with [publish_message_template](https://studio.inttegro.com/machine/ruby/inttegro-mcp/tools.md#publish_message_template) and [preview_message_template](https://studio.inttegro.com/machine/ruby/inttegro-mcp/tools.md#preview_message_template) when those concerns enter scope.

### Recommended MCP assistance

Use these through an authenticated Inttegro MCP connection. This document remains the contract source.

- [`get_message`](https://studio.inttegro.com/machine/ruby/inttegro-mcp/tools.md#get_message) — read; no mutation confirmation. Gets the lifecycle status of one customer message without exposing its body or recipient contact details.
- [`get_message_template`](https://studio.inttegro.com/machine/ruby/inttegro-mcp/tools.md#get_message_template) — read; no mutation confirmation. Gets one template with editable channel content and version state while withholding variable defaults and private email-header values.
- [`preview_message_template`](https://studio.inttegro.com/machine/ruby/inttegro-mcp/tools.md#preview_message_template) — read; no mutation confirmation. Renders the current draft with supplied non-secret variables so the merchant can review the actual SMS or email before publishing.

## Document content

# Update and publish a message template

Updating a published template creates a new draft. Existing sends stay on the published version until the new draft is explicitly published.

### Prompt

> **Copyable prompt:**
>
> Update message template `<MESSAGE_TEMPLATE_ID>` so the pickup reminder also
> includes the closing time. Preserve its existing channel and purpose, add a
> required `closing_time` string variable, and show the proposed changes before
> creating the draft. Preview it with realistic values, let me review the exact
> rendered copy, then ask separately before publishing it.

The agent uses [`get_message_template`](https://studio.inttegro.com/machine/ruby/inttegro-mcp/tools.md#get_message_template) to understand the current version, confirms [`update_message_template`](https://studio.inttegro.com/machine/ruby/inttegro-mcp/tools.md#update_message_template), previews the new draft with [`preview_message_template`](https://studio.inttegro.com/machine/ruby/inttegro-mcp/tools.md#preview_message_template), and confirms [`publish_message_template`](https://studio.inttegro.com/machine/ruby/inttegro-mcp/tools.md#publish_message_template) separately.

## Sample response: Updated version published

Version 4 replaced version 3 only after its draft preview was approved.

- **Template**: Pickup reminder — tmpl\_example\_pickup
- **Previous published version**: 3
- **Published version**: 4
- **Unpublished changes**: No

* **Row 1**: Step: Update; Result: Draft version 4 created
* **Row 2**: Step: Preview; Result: Closing time rendered as 6:00 PM
* **Row 3**: Step: Publish; Result: Version 4 published after confirmation

Approved copy: “Hi Ama, order WEB-1042 is ready at Osu. Please collect it
before 6:00 PM.”

If the draft is not published, new sends continue using the previous published version. The send tool refuses a template with unpublished changes so that reviewed and delivered copy cannot silently differ.
