listmonk unofficial
PUT/templates/{id}

Replace a template

Replaces a template's configuration. Supply the template properties you want to set, and use type to choose campaign, visual campaign, or transactional template behavior.

1 parameter · 5 body fields
idintegerrequired
The integer identifier of the template to replace.

Template properties to set.

namestringoptional
Name of the template
typestringoptional
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)
bodystringoptional
HTML body of the template

1 status code
200Returns the updated template object in `data`, including its identifier, timestamps, name, body, body source, subject, type, and default status.
dataobjectoptional

Error handling

The id path parameter must identify an existing template. type must be campaign, campaign_visual, or tx; subject applies to tx templates, and body_source applies to campaign_visual templates.