updateEmailTemplate
Modify specific fields of an existing email template by ID, leaving omitted fields unchanged to update subject, body, wrapper, triggers, or category.
Instructions
Update an email template - Update an existing emailtemplate record by ID. Fields omitted are untouched. Writes live data.
Use when: editing any field on an existing template — subject, body, wrapper mode (notemplate), category, signature, triggers, etc. Mirrors createEmailTemplate field-for-field; only email_id is required.
Required: email_id.
Enums (same as createEmailTemplate): signature: 0/1; notemplate: 0 (logo left), 2 (logo center), 3 (logo right), 4 (template, no logo), 1 (plaintext-only, no wrapper); category_id: 0/1/3/4/15/16 (unrestricted on update); unsubscribe_link: 0/1.
See also: createEmailTemplate (add new), deleteEmailTemplate (remove permanently).
Returns: { status: "success", message: {...updatedRecord} } — the full updated record after changes applied.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| email_id | Yes | ||
| email_name | No | Internal name for this email template (used by `[email-template name=...]` references and admin lookups). **Lowercase, hyphens, no spaces** (e.g. `welcome-email`, `password-reset`, `lead-notification-admin`) — see **Rule: Email template recipe**. | |
| email_subject | No | Supports merge tags | |
| email_body | No | Content-only HTML — BD wraps it in the document scaffold. Open with any content tag (`<p>`, `<table>`, `<div>`, `<h1>`/`<h2>`, `<img>`, etc.). Inline `style=""` only — no `<style>` blocks (Outlook strips them) and no `class=""` (emails have no site stylesheet). Gradients need a fallback `background-color:` first. Verify image URLs return 200 before embedding when possible. Supports `%%%merge_tag%%%` tokens and `[widget=Name]` shortcodes. See **Rule: Email template recipe**. | |
| email_type | No | ||
| triggers | No | Comma-separated events | |
| website | No | 0=platform-wide | |
| email_from | No | ||
| priority | No | ||
| signature | No | Append the site's default email signature to this template. Set to `1` to include the site signature; BD appends it automatically at send time. | |
| category_id | No | Template category. `update` is unrestricted across `0`/`1`/`3`/`4`/`15`/`16`. (On `create`, only `0` is allowed — other values are system-populated.) | |
| notemplate | No | Template + logo wrapper mode. `0` = template + logo left; `2` = template + logo center; `3` = template + logo right; `4` = template, no logo; `1` = no template or logo (plaintext-only). When this is anything other than `1`, BD's global template wraps `email_body` in a 600px-wide containing table — do NOT add your own outer max-width wrapper in that case. | |
| content_type | No | ||
| unsubscribe_link | No | ||
| _clear_fields | No | Column names to clear to empty string. Available on every `update*` operation. Works on base columns AND EAV/`users_meta` rows (rows preserved with `value=""`). To actually clear a field you MUST use this parameter — sending the field with `""` alone is a no-op (BD drops empty values). To remove a `users_meta` row entirely, use `deleteUserMeta`. See **Rule: Clearing fields**. Example: `_clear_fields: ["h2", "hero_link_url"]`. |