Save template
save_templateSave an email design as a reusable template in the user's Send16 workspace. Use this when the user has designed an email (for example in a Claude artifact) and wants it in Send16. Pass the complete email HTML. Send16 hosts every image (remote URLs and inline data: images), converts merge tags like {{first_name}} to Send16's format, and stores the HTML exactly as designed. For best results across Gmail, Outlook and Apple Mail the HTML should be email-safe: table-based layout around 600px wide, inline styles, PNG/JPG/GIF images in tags (not SVG or CSS backgrounds), web-safe font fallbacks, and alt text on images. Returns the template id; follow up with send_template_test to send a preview.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| html | Yes | The complete email HTML (a full <html> document or a body fragment) | |
| mode | No | hybrid (default): keep the exact HTML, convertible to editable blocks later. html: exact HTML only. blocks: convert to editable builder blocks now (lossy for complex designs). | hybrid |
| name | Yes | Template name, e.g. 'October newsletter' | |
| apiKey | No | Send16 API key (overrides SEND16_API_KEY env var) | |
| category | No | Library category, e.g. newsletter, onboarding, announcement, ecommerce, transactional. Defaults to custom. | |
| hostImages | No | Copy every image onto Send16 hosting so it can't break later (default true) | |
| description | No | Short description shown in the template library | |
| convertMergeTags | No | Convert common merge tags ({{first_name}}, *|FNAME|*) to Send16 tags (default true) |