Edit letter template
spur_update_letter_templateEdit one of the user's letter templates and show the updated preview. For text tweaks pass replacements (exact find → replace); to redesign, pass full html. letter_type switches between top_first_page and insert_blank_page. Spur default and gallery templates can't be edited: copy them first with spur_create_letter_template base_template_id.
HTML guidance (see spur://letter-design-guide): one US Letter page (8.5"×11"), full HTML document with inline , "@page { size: 8.5in 11in; margin: 0; }", no scripts. One root 8.5in wide; px/in units only (no vh/vw); no box-shadow, transforms or manual page breaks. top_first_page: leave the first 3.15in blank (an empty ), body ≈ 3–4 short paragraphs. insert_blank_page: no address zone; letterhead up to 1.8in, body up to ~400 words. Images as absolute https URLs. 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 merge fields such as {{owner_first_name}}, {{property_address}}, {{your_name}}, {{your_phone}}, {{company_name}} (see spur://merge-variables).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| html | No | Full replacement HTML | |
| name | No | New template name | |
| category | No | Category label, e.g. "Seller Outreach" | |
| description | No | Internal note about the template; never printed | |
| letter_type | No | "top_first_page": the address prints in the top 3.15in of page 1 (shows through a #10 window envelope), so keep that band empty. "insert_blank_page": Spur adds a separate address page in front, so the letter can use the whole page (one extra page is billed). | |
| template_id | Yes | Template id (UUID from a Spur list/search tool) | |
| replacements | No | Small edits applied in order instead of resending the full content |