Skip to main content
Version: 2023-02-21

Update a template with settings

PATCH 

/emails/builder/:templateId

deprecated

This endpoint has been deprecated and may be replaced or removed in future versions of the API.

Update a template with settings

Request

Version stringrequired

API Version

Available options2023-02-21
templateId stringrequired
application/json

Bodyrequired

    locationIdstringrequired

    Location ID where the template belongs

    updatedBystring

    User ID who is updating the template

    editorContentobject

    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.

    editorTypestring

    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 optionshtmlbuildertext
    previewTextstring

    Preview text shown in email clients before opening

    subjectLinestring

    Email subject line

    fromNamestring

    Sender name displayed in email

    fromEmailstring

    Sender email address

    namestring

    Template name

    archivedboolean

    Whether the template is archived

    fieldDefaultsobject

    Field-level default values for custom variables in template fields (fromName, subjectLine, previewText)

application/json

Success

Schema
    okbooleanrequired

    Indicates if the update was successful

    idstringrequired

    Unique template identifier

    namestringrequired

    Template name

    archivedbooleanrequired

    Whether the template is archived

    builderVersionstringrequired

    Builder version used for the template

    fromNamestringrequired

    Sender name displayed in email

    fromEmailstringrequired

    Sender email address

    subjectLinestringrequired

    Email subject line

    previewTextstringrequired

    Preview text shown in email clients

    previewUrlstringrequired

    URL to preview the rendered template

    typestringrequired

    Type of template editor used

    Available optionshtmlbuilder
    lastUpdatedstringrequired

    Timestamp of last update

    createdAtstringrequired

    Timestamp when template was created

    isPlainTextbooleanrequired

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

    fieldDefaultsobject

    Field-level default values for custom variables in template fields