POST
/templatesCreate 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.
Template details. name, type, and body are required.
namestringrequired
Name of the template
typestringrequired
Type of the template
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
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.