Create email template
spur_create_email_templateSave a new email template and show its inbox preview. Ways to start:
From blank: start_from_blank=true gives a tested 600px responsive layout with greeting, signature and a compliant footer; pass html to replace it.
Redesign: base_template_id copies one of the user's email templates.
From scratch: pass html (or only text_body for a plain-text email). The saved template can then be used by outreach workflows (spur_create_workflow / spur_set_workflow_step_template).
Email HTML guidance (see spur://email-design-guide): full HTML document, table-based layout 600px wide, inline styles on elements (a small block in is fine for resets/media queries), web-safe font stacks, no JavaScript, no forms, no external CSS. Images as absolute https URLs with alt text and width attributes. The user's own images (logo, headshot, property photos): spur_list_images gives their URLs; if they want to use an image they have, call spur_upload_image (or spur_save_image for a link) and use the saved URL. Use PNG or JPG in emails, not SVG. A hidden preheader right after sets the inbox snippet. Include an opt-out line ("Reply STOP" or an unsubscribe link) and the sender's postal address in the footer. Keep it under 50,000 characters. Use merge fields like {{owner_first_name}}, {{property_address}}, {{your_name}}, {{your_phone}}, {{company_name}} (see spur://merge-variables). The plain-text version is generated from the HTML unless you pass text_body.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| html | No | Full email HTML; merge fields like {{owner_first_name}} are filled per recipient | |
| name | Yes | Template name shown in Spur | |
| subject | No | Required unless copying a template | |
| text_body | No | Plain-text version; generated from the HTML when omitted | |
| is_default | No | Make this the user's default email template | |
| description | No | Internal note about the template; never sent to owners | |
| base_template_id | No | Copy this email template as the starting point | |
| start_from_blank | No | true = start from Spur's responsive, compliant blank email layout |