> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bizzyco.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Email Template Tools

> Create, render, and send Mustache-based email templates

The Bizzy MCP server provides 7 tools for managing email templates and using
them to send templated emails. These tools are organized into two categories:
templates and render & send.

## Templates

CRUD tools for managing reusable email templates. Templates support Mustache
syntax for dynamic content in both subject lines and bodies.

### createEmailTemplate

Create a new email template with name (max 200 chars), subject (max 1000 chars),
body (max 50000 chars), and optional variables. Templates support Mustache
syntax for dynamic content.

**Permission:** `emailTemplates:write`

**Parameters:**

| Name          | Type      | Required | Description                                                                               |
| ------------- | --------- | -------- | ----------------------------------------------------------------------------------------- |
| `name`        | string    | Yes      | The name of the email template (1-200 characters)                                         |
| `subject`     | string    | Yes      | The subject line of the email template (1-1000 characters). Supports Mustache variables.  |
| `body`        | string    | Yes      | The body content of the email template (1-50000 characters). Supports Mustache variables. |
| `description` | string    | No       | Optional description of the email template (max 2000 characters)                          |
| `variables`   | string\[] | No       | Optional list of variable names used in the template for documentation                    |

**Returns:** The created email template object.

***

### getEmailTemplate

Get a specific email template by ID, including all template details.

**Permission:** `emailTemplates:read`

**Parameters:**

| Name | Type          | Required | Description                              |
| ---- | ------------- | -------- | ---------------------------------------- |
| `id` | string (UUID) | Yes      | The ID of the email template to retrieve |

**Returns:** The email template object, or `null` if not found.

***

### listEmailTemplates

List email templates for the organization with pagination. Supports filtering by
status and name.

**Permission:** `emailTemplates:read`

**Parameters:**

| Name     | Type   | Required | Default | Description                                                         |
| -------- | ------ | -------- | ------- | ------------------------------------------------------------------- |
| `limit`  | number | No       | 10      | Number of email templates to return (1-100)                         |
| `offset` | number | No       | 0       | Number of email templates to skip for pagination                    |
| `status` | string | No       | -       | Filter by template status (`active` or `archived`)                  |
| `name`   | string | No       | -       | Filter by name (case-insensitive partial match, max 200 characters) |

**Returns:**

```json theme={null}
{
  "emailTemplates": [...],
  "count": 8,
  "limit": 10,
  "offset": 0
}
```

***

### updateEmailTemplate

Update an existing email template with new values for any template fields. Name
max 200 chars, subject max 1000 chars, body max 50000 chars.

**Permission:** `emailTemplates:write`

**Parameters:**

| Name          | Type              | Required | Description                                                   |
| ------------- | ----------------- | -------- | ------------------------------------------------------------- |
| `id`          | string (UUID)     | Yes      | The ID of the email template to update                        |
| `name`        | string            | No       | The name of the email template (1-200 characters)             |
| `description` | string \| null    | No       | Description of the email template (max 2000 characters)       |
| `subject`     | string            | No       | The subject line of the email template (1-1000 characters)    |
| `body`        | string            | No       | The body content of the email template (1-50000 characters)   |
| `variables`   | string\[] \| null | No       | List of variable names used in the template for documentation |
| `status`      | string            | No       | Template status (`active` or `archived`)                      |

**Returns:** The updated email template object.

***

### deleteEmailTemplate

Delete an email template (soft delete).

**Permission:** `emailTemplates:delete`

**Parameters:**

| Name | Type          | Required | Description                            |
| ---- | ------------- | -------- | -------------------------------------- |
| `id` | string (UUID) | Yes      | The ID of the email template to delete |

**Returns:** The deleted email template object.

***

## Render & Send

Tools for rendering templates with variable data and dispatching templated
emails through the organization's email pipeline.

### renderEmailTemplate

Render an email template by ID with provided data variables using Mustache
templating. Returns the rendered subject and the raw rendered body — the
delivered email (see `sendTemplatedEmail`) additionally sanitizes the body
(unsafe markup removed) and wraps it in a standard email layout.

**Permission:** `emailTemplates:read`

**Parameters:**

| Name         | Type                     | Required | Description                                                  |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------ |
| `templateId` | string (UUID)            | Yes      | The ID of the email template to render                       |
| `data`       | Record\<string, unknown> | Yes      | Key-value pairs of variable data to render into the template |

**Returns:** Object with `subject` and `body` strings containing the rendered
content.

***

### sendTemplatedEmail

Render an email template with data and send it. Fetches the template, renders
subject and body with the provided data, sanitizes the body (scripts, event
handlers, and other unsafe markup are removed), wraps it in a standard
email-client-compatible layout, auto-generates a plain-text alternative, and
sends the email from the specified email address.

**Permission:** `emailTemplates:write`

**Parameters:**

| Name                 | Type                     | Required | Description                                       |
| -------------------- | ------------------------ | -------- | ------------------------------------------------- |
| `templateId`         | string (UUID)            | Yes      | The ID of the email template to use               |
| `data`               | Record\<string, unknown> | Yes      | Template variable data for rendering              |
| `to`                 | string\[]                | Yes      | Array of recipient email addresses (at least one) |
| `fromEmailAddressId` | string (UUID)            | Yes      | The ID of the email address to send from          |
| `cc`                 | string\[]                | No       | Array of CC email addresses                       |
| `bcc`                | string\[]                | No       | Array of BCC email addresses                      |
| `replyTo`            | string                   | No       | Reply-to email address                            |

**Returns:** Object with `subject`, `to`, `from`, `rendered`, and `sent` fields
summarizing the send result.

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Email Address Tools" icon="at" href="/mcp-server/tools/email-addresses">
    Discover which email addresses are available to send from
  </Card>

  <Card title="Authentication" icon="key" href="/mcp-server/authentication">
    Learn how MCP clients authenticate to the server
  </Card>
</CardGroup>
