create_template
Create a campaign layout or transactional email template and return its ID for use in other Listmonk operations.
Instructions
Create a template and return its ID. Type 'campaign' is a layout that wraps campaign bodies; type 'tx' is a transactional email template that needs a subject and is sent with send_transactional_email. For large HTML bodies prefer create_template_from_file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | Full template HTML. A 'campaign' template must contain {{ template "content" . }} where the campaign body goes | |
| name | Yes | Template name | |
| type | No | Template type: 'campaign' or 'tx' (transactional) | campaign |
| subject | No | Subject line (required for 'tx' transactional templates) | |
| is_default | No | Whether this is default |