Update Email Template
meisa_update_templateUpdate specific fields on an existing Meisa email template (PATCH-style). Only fields you pass are changed; everything else stays as-is. Use this when the user wants to revise an existing template's copy, subject, preview text, HTML body, category, or description without creating a duplicate. Requires the template_id (use meisa_list_templates or meisa_get_template to find it). Returns the full updated template.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | New template name (internal, not shown to recipients). | |
| slug | No | New URL-safe slug. Will be slugified; collisions within the product are auto-suffixed (e.g. 'welcome-1'). | |
| subject | No | New email subject line. Supports {{variable}} personalization tokens. | |
| category | No | New template category for organization. | |
| description | No | New internal description/notes about this template. | |
| template_id | Yes | The UUID of the email template to update. Format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | |
| content_html | No | New full HTML email body. Must be valid HTML. | |
| content_text | No | New plain-text version of the body. If you update content_html and omit this, the plain-text body is automatically regenerated from the new HTML. | |
| preview_text | No | New preview text shown in email client inbox previews (max 255 chars). | |
| spintax_variables | No | Add or revise the template's reusable spintax variable pools, shaped as {"name": ["option1", "option2", ...]}. Pools you pass are MERGED into the existing ones: a pool with the same name is overwritten, pools you do not mention are left untouched. Passing {} changes nothing. Reference pools in subject/content with [[name]] for per-recipient variation at send time. Inline spintax of the form {a|b|c} works directly inside content_html/content_text and does NOT require this field. |