# save_site_message_template

Source: https://modulify.ai/docs/mcp/messages/save-site-message-template

Creates a text template of the site's own, or changes the text of one, and sends it to Sent for review.

- Title: Save a text template
- Scope: `config:write`
- Access: Makes changes

Leave `key` out to create a template, with a name no other template on the site has, up to 40 characters, and a site can have 20 of its own. Pass `key` to change a template that is `initial`, `rejected` or `disabled`, and a built-in one keeps its name. Write the text with each placeholder in double braces, such as `Hi {{name}}, your order {{order}} is ready at {{site}}. Reply STOP to opt out.`, and give a realistic example for each in `examples`. Sent refuses a text that starts or ends with a placeholder, two placeholders side by side, or too few words around them, and a placeholder named `link` or `url` needs a full `https://` link as its example. The text can be 1,024 characters with 10 placeholders. `submitted` false means it was saved but sending it for review failed, with the reason. See [Your own templates](https://modulify.ai/docs/built-in/messages#your-own-templates).

## Inputs

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `projectId` | string | Yes | The site id. |
| `key` | string | No | The key of the template to change, from `list_site_message_templates`. Leave it out to create a new one. |
| `name` | string | No | What to call a new template, such as Pickup ready. Ignored for a built-in template. |
| `text` | string | Yes | The text with its `{{placeholders}}`. |
| `examples` | object | Yes | An example value for each placeholder, keyed by its name. |