Update a template

http
POST https://services.leadconnectorhq.com/emails/builder/data

Authorization

NameTypeRequiredExampleDescription
AuthorizationstringYesBearer token generated from the Leadway portal. See Authentication.
VersionstringYes2021-07-28API version.

Body

NameTypeRequiredExampleDescription
locationIdstringYesve9EPM428h8vShlRW1KT
templateIdstringYeszYy3YOUuHxgomU1uYJty
updatedBystringYeszYy3YOUuHxgomU1uYJty
dndobjectYes{elements:[], attrs:{}, templateSettings:{}}
htmlstringYes
editorTypestringYesPossible values: 'html', 'builder'
previewTextstringNozYy3YOUuHxgomU1uYJty
isPlainTextbooleanNofalse

Responses

201 - Success
  • ok (string): ok Example: true

  • traceId (string): trace id Example: 0c52e980-41f6-4be7-8c4b-32332ss

  • previewUrl (string): preview url Example: https://example.com

  • templateDownloadUrl (string): template data download url Example: https://example.com

json
{
  "ok": "true",
  "traceId": "0c52e980-41f6-4be7-8c4b-32332ss",
  "previewUrl": "https://example.com",
  "templateDownloadUrl": "https://example.com"
}
400 - Bad Request
json
{}
401 - Unauthorized
json
{}
404 - Not Found
422 - Unprocessable Entity
json
{}

Example

curl -X POST 'https://services.leadconnectorhq.com/emails/builder/data' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -d '{
  "locationId": "ve9EPM428h8vShlRW1KT",
  "templateId": "zYy3YOUuHxgomU1uYJty",
  "updatedBy": "zYy3YOUuHxgomU1uYJty",
  "dnd": "{elements:[], attrs:{}, templateSettings:{}}",
  "html": "",
  "editorType": "html",
  "previewText": "zYy3YOUuHxgomU1uYJty",
  "isPlainText": "false"
}'

Last updated October 26, 2026

Was this page helpful?