Templates
Replace template
Session only · not verifiedPUT
/api/v1/templates/{id|alias}Full replace. Requires a dashboard session (API key → 403). Body and response not yet verified (never captured).
Path Parameters
id|aliasstringrequired
Body Parameters
namestringrequiredcategory"Newsletter" | "Welcome" | "Promotional" | "Transactional" | "EventAnnouncement"requiredhtmlContentstringrequiredTemplate HTML.
contentstringGrapesJS JSON string.
aliasstringfromstringsubjectstringreplyTostringtextstringvariables{key,type,fallbackValue}[]Up to 50.
type= "string".
Notes
NOT observed live (API key -> 403; no Postman sample supplied). successAssumed is the create response with a changed subject; the PUT body is ASSUMED to be the create body (verify live). Q1: treat as a full replace.
Errors
| Status | Case | Body |
|---|---|---|
| 403 | errorApiKey | {"error": {"code": "Forbidden", "message": "You do not have permission to perform this action."}} |
| 403 | errorStarter | {"error": {"code": "Forbidden", "message": "Starter templates cannot be modified. Duplicate it first."}} |
Snippets use the MailCraftApi (C#) and MailCraft (Python) helpers from Introduction → Helpers.