volanea_create_template
Create a reusable email template with {{variable}} placeholders. Idempotent by name: an existing template with the same name is updated instead (content changes snapshot a new version, old versions are retained). You have the user's codebase — match their product name, tone, and brand colors rather than writing generic copy. The reply is a summary — id, version, and the detectedVariables a send must supply — not the body you just sent; read the stored HTML back with volanea_get_template if you need it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | HTML body. Supports {{variable}} placeholders. | |
| name | Yes | Template name, e.g. 'Welcome email'. Acts as the idempotency key. | |
| type | No | Decides who can receive it, so getting this wrong is a compliance problem rather than a cosmetic one. `transactional` reaches a recipient even when their contact is unsubscribed (password resets, receipts, verification codes). `marketing` is skipped for unsubscribed contacts and must carry an unsubscribe link. Default to `marketing` for anything promotional; use `transactional` only when the message is a direct response to something the user did. | |
| subject | Yes | Subject line. Supports {{variable}} placeholders. | |
| fromName | No | Human-readable sender name. | |
| fromEmail | Yes | Sender address — must be on a verified domain to deliver in live mode. | |
| previewText | No | Inbox preview line (~100 chars visible). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | Machine-readable failure code to branch on. Present only when success is false. | |
| data | No | Present when success is true. | |
| error | No | Human-readable failure reason. Present only when success is false. | |
| success | Yes | False when the call failed; read `error` and `code` in that case. |