Update a template with settings
PATCH/emails/builder/:templateId
This endpoint has been deprecated and may be replaced or removed in future versions of the API.
Update a template with settings
Request
API Version
2023-02-21- application/json
- Body
- Example (auto)
Bodyrequired
Location ID where the template belongs
User ID who is updating the template
Editor content - can be HTML string, plain text string, or DND builder object depending on editorType. When editorType is "html" or "text", this should be a string. When editorType is "builder", this should be a DND object with elements, attrs, and templateSettings. Must be provided together with editorType.
Type of editor content: "html" for HTML content, "text" for plain text content, "builder" for drag-and-drop builder content. Must be provided together with editorContent.
htmlbuildertextPreview text shown in email clients before opening
Email subject line
Sender name displayed in email
Sender email address
Template name
Whether the template is archived
Field-level default values for custom variables in template fields (fromName, subjectLine, previewText)
{
"locationId": "ve9EPM428h8vShlRW1KT",
"updatedBy": "zYy3YOUuHxgomU1uYJty",
"editorContent": "<html><body>Hello World</body></html>",
"editorType": "html",
"previewText": "Email preview text",
"subjectLine": "Welcome to our newsletter",
"fromName": "John Doe",
"name": "Newsletter Template",
"archived": false,
"fieldDefaults": {
"subjectLine": {
"contact.first_name:0": "Friend"
}
}
}
Success
- application/json
- Schema
- Example (auto)
Schema
Indicates if the update was successful
Unique template identifier
Template name
Whether the template is archived
Builder version used for the template
Sender name displayed in email
Sender email address
Email subject line
Preview text shown in email clients
URL to preview the rendered template
Type of template editor used
htmlbuilderTimestamp of last update
Timestamp when template was created
Whether the template contains plain text content (true) or HTML content (false)
Field-level default values for custom variables in template fields
{
"ok": true,
"id": "507f1f77bcf86cd799439011",
"name": "My Email Template",
"archived": false,
"builderVersion": "2",
"fromName": "John Doe",
"subjectLine": "Welcome to our newsletter",
"previewText": "Check out our latest updates",
"previewUrl": "https://example.com/preview/template123",
"type": "builder",
"lastUpdated": "2024-01-15T10:30:00Z",
"createdAt": "2024-01-01T08:00:00Z",
"isPlainText": false,
"fieldDefaults": {
"subjectLine": {
"contact.first_name:0": "Friend"
}
}
}