Skip to main content
PATCH
/
emails
/
builder
/
{templateId}
Update a template with settings
curl --request PATCH \
  --url https://services.leadconnectorhq.com/emails/builder/{templateId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'Version: <version>' \
  --data '
{
  "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",
  "fromEmail": "john@example.com",
  "name": "Newsletter Template",
  "archived": false
}
'
{
  "ok": true,
  "id": "507f1f77bcf86cd799439011",
  "name": "My Email Template",
  "archived": false,
  "builderVersion": "2",
  "fromName": "John Doe",
  "fromEmail": "john@example.com",
  "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
}

Authorizations

Authorization
string
header
required

Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.

Headers

Version
enum<string>
required

API Version

Available options:
2021-07-28
Example:

"2021-07-28"

Path Parameters

templateId
string
required

Body

application/json
locationId
string
required

Location ID where the template belongs

Example:

"ve9EPM428h8vShlRW1KT"

updatedBy
string

User ID who is updating the template

Example:

"zYy3YOUuHxgomU1uYJty"

editorContent

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.

Example:

"<html><body>Hello World</body></html>"

editorType
enum<string>

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.

Available options:
html,
builder,
text
Example:

"html"

previewText
string

Preview text shown in email clients before opening

Example:

"Email preview text"

subjectLine
string

Email subject line

Example:

"Welcome to our newsletter"

fromName
string

Sender name displayed in email

Example:

"John Doe"

fromEmail
string

Sender email address

Example:

"john@example.com"

name
string

Template name

Example:

"Newsletter Template"

archived
boolean

Whether the template is archived

Example:

false

Response

Success

ok
boolean
required

Indicates if the update was successful

Example:

true

id
string
required

Unique template identifier

Example:

"507f1f77bcf86cd799439011"

name
string
required

Template name

Example:

"My Email Template"

archived
boolean
required

Whether the template is archived

Example:

false

builderVersion
string
required

Builder version used for the template

Example:

"2"

fromName
string
required

Sender name displayed in email

Example:

"John Doe"

fromEmail
string
required

Sender email address

Example:

"john@example.com"

subjectLine
string
required

Email subject line

Example:

"Welcome to our newsletter"

previewText
string
required

Preview text shown in email clients

Example:

"Check out our latest updates"

previewUrl
string
required

URL to preview the rendered template

Example:

"https://example.com/preview/template123"

type
enum<string>
required

Type of template editor used

Available options:
html,
builder
Example:

"builder"

lastUpdated
string
required

Timestamp of last update

Example:

"2024-01-15T10:30:00Z"

createdAt
string
required

Timestamp when template was created

Example:

"2024-01-01T08:00:00Z"

isPlainText
boolean
required

Whether the template contains plain text content (true) or HTML content (false)

Example:

false

Last modified on March 4, 2026