Compose Template
compose-templateSet TipTap JSON content for your email template to enable visual editing in the Resend dashboard. Also update subject or name in the same call.
Instructions
Purpose: Set the TipTap JSON content of a template, enabling it to be edited visually in the Resend dashboard editor. Automatically connects and disconnects from the editor. Can also update metadata (subject, name) in the same call.
This is the recommended way to set email content. Content set via compose-template can be visually edited by the user in the dashboard.
Workflow: get-tiptap-json-content (with include_schema: true) → compose-template
When to use:
After create-template, to set the email body
When the user wants to write, edit, or style email content
When the user wants to collaborate on the email in the dashboard editor
Important: Always call get-tiptap-json-content first to retrieve the existing TipTap JSON, then build your changes on top of it. Skipping this will overwrite all existing content.
Note: Switching between compose (TipTap) and update (raw HTML) modes is lossy — some content or formatting may be lost. If the template already has HTML content, ask the user before switching to compose mode.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The template ID, alias, or Resend dashboard URL (e.g. https://resend.com/templates/<id>) | |
| name | No | Update the template name. | |
| content | No | TipTap JSON content. Call get-tiptap-json-content (with include_schema: true) first to get the existing content and the schema reference. | |
| subject | No | Update the default email subject. |