listmonk unofficial
POST/templates

Create a template

Creates a new template. Supply name, type, and body; choose type from campaign, campaign_visual, or tx, and include subject or body_source when relevant to that template type.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

5 body fields

Template details. name, type, and body are required.

namestringrequired
Name of the template
typestringrequired
Type of the template
Allowed:campaigncampaign_visualtx
subjectstringoptional
Subject line for the template (only for tx)
body_sourcestringoptional
JSON source for the email-builder template (only for campaign_visual)
bodystringrequired
HTML body of the template

1 status code
200Returns the created template in the `data` field, including its identifier, name, type, and template content.
dataobjectoptional

Error handling

name, type, and body are required. type must be one of campaign, campaign_visual, or tx.