Create an email template
POST/emails/locations/:locationId/templates
Create a new email template
Request
Version stringrequired
API Version
Available options
v3locationId stringrequired
Location ID
- application/json
- Body
- Example (auto)
Bodyrequired
namestringrequired
Template name
editorTypestringrequired
Editor type for the new template. Use html for code-editor templates or text for plain-text templates.
Available options
htmltexteditorContentstring
Optional initial editor content. Provide HTML or plain-text string content.
parentFolderIdstring
Parent folder ID
subjectLinestring
Email subject line
fromNamestring
Sender name
fromEmailstring
Sender email address
previewTextstring
Preview text
userIdstring
ID of the user performing this action
{
"name": "Newsletter Template",
"editorType": "html",
"editorContent": "<html><body>Hello World</body></html>",
"parentFolderId": "67f15c2ae99226d5bcccb8f0",
"subjectLine": "Welcome to our newsletter",
"fromName": "John Doe",
"previewText": "Email preview text",
"userId": "507f1f77bcf86cd799439011"
}
Success
- application/json
- Schema
- Example (auto)
Schema
idstringrequired
Template ID
namestringrequired
Template name
editorTypestringrequired
Editor type
Available options
htmltextisPlainTextbooleanrequired
Whether template is plain text
parentFolderIdstring
Parent folder ID
fromNamestring
Sender name
fromEmailstring
Sender email address
subjectLinestring
Email subject line
previewTextstring
Preview text
previewUrlstring
Preview URL
createdAtstring
Created timestamp
updatedAtstring
Updated timestamp
traceIdstring
Trace ID of request
{
"id": "507f1f77bcf86cd799439011",
"name": "Newsletter Template",
"editorType": "html",
"isPlainText": false,
"parentFolderId": "67f15c2ae99226d5bcccb8f0",
"fromName": "John Doe",
"subjectLine": "Welcome to our newsletter",
"previewText": "Email preview text",
"previewUrl": "https://example.com/preview/template123",
"createdAt": "2025-07-24T11:55:43.598Z",
"updatedAt": "2025-07-24T11:55:43.598Z",
"traceId": "019e4ef5-a65e-4198-8cf9-8e93dca9bda4"
}