Create a new template
Create a new template
POST
/
emails
/
builder
Create a new template
curl --request POST \
--url https://services.leadconnectorhq.com/emails/builder \
--header 'Content-Type: application/json' \
--header 'Version: <version>' \
--data '
{
"locationId": "ve9EPM428h8vShlRW1KT",
"title": "template title",
"updatedBy": "zYy3YOUuHxgomU1uYJty",
"builderVersion": "2",
"name": "Template1",
"parentId": "zYy3YOUuHxgomU1uYJty",
"templateDataUrl": "",
"importURL": "https://tplshare.com/fhYJ3Mi",
"templateSource": "template_library",
"isPlainText": false,
"subjectLine": "Email Subject",
"fromName": "Name of sender",
"fromEmail": "test@abc.com",
"previewText": "preview text"
}
'const options = {
method: 'POST',
headers: {Version: '<version>', 'Content-Type': 'application/json'},
body: JSON.stringify({
locationId: 've9EPM428h8vShlRW1KT',
title: 'template title',
updatedBy: 'zYy3YOUuHxgomU1uYJty',
builderVersion: '2',
name: 'Template1',
parentId: 'zYy3YOUuHxgomU1uYJty',
templateDataUrl: '',
importURL: 'https://tplshare.com/fhYJ3Mi',
templateSource: 'template_library',
isPlainText: false,
subjectLine: 'Email Subject',
fromName: 'Name of sender',
fromEmail: 'test@abc.com',
previewText: 'preview text'
})
};
fetch('https://services.leadconnectorhq.com/emails/builder', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://services.leadconnectorhq.com/emails/builder"
payload = {
"locationId": "ve9EPM428h8vShlRW1KT",
"title": "template title",
"updatedBy": "zYy3YOUuHxgomU1uYJty",
"builderVersion": "2",
"name": "Template1",
"parentId": "zYy3YOUuHxgomU1uYJty",
"templateDataUrl": "",
"importURL": "https://tplshare.com/fhYJ3Mi",
"templateSource": "template_library",
"isPlainText": False,
"subjectLine": "Email Subject",
"fromName": "Name of sender",
"fromEmail": "test@abc.com",
"previewText": "preview text"
}
headers = {
"Version": "<version>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"redirect": "66e811229245fc098765590",
"traceId": "0c52e980-41f6-4be7-8c4b-e2c5a13dc3c2"
}{
"statusCode": 400,
"message": "Bad Request"
}{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}{
"statusCode": 422,
"message": [
"Unprocessable Entity"
],
"error": "Unprocessable Entity"
}Body
application/json
Last modified on March 8, 2026
Was this page helpful?
Create a new template
curl --request POST \
--url https://services.leadconnectorhq.com/emails/builder \
--header 'Content-Type: application/json' \
--header 'Version: <version>' \
--data '
{
"locationId": "ve9EPM428h8vShlRW1KT",
"title": "template title",
"updatedBy": "zYy3YOUuHxgomU1uYJty",
"builderVersion": "2",
"name": "Template1",
"parentId": "zYy3YOUuHxgomU1uYJty",
"templateDataUrl": "",
"importURL": "https://tplshare.com/fhYJ3Mi",
"templateSource": "template_library",
"isPlainText": false,
"subjectLine": "Email Subject",
"fromName": "Name of sender",
"fromEmail": "test@abc.com",
"previewText": "preview text"
}
'const options = {
method: 'POST',
headers: {Version: '<version>', 'Content-Type': 'application/json'},
body: JSON.stringify({
locationId: 've9EPM428h8vShlRW1KT',
title: 'template title',
updatedBy: 'zYy3YOUuHxgomU1uYJty',
builderVersion: '2',
name: 'Template1',
parentId: 'zYy3YOUuHxgomU1uYJty',
templateDataUrl: '',
importURL: 'https://tplshare.com/fhYJ3Mi',
templateSource: 'template_library',
isPlainText: false,
subjectLine: 'Email Subject',
fromName: 'Name of sender',
fromEmail: 'test@abc.com',
previewText: 'preview text'
})
};
fetch('https://services.leadconnectorhq.com/emails/builder', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://services.leadconnectorhq.com/emails/builder"
payload = {
"locationId": "ve9EPM428h8vShlRW1KT",
"title": "template title",
"updatedBy": "zYy3YOUuHxgomU1uYJty",
"builderVersion": "2",
"name": "Template1",
"parentId": "zYy3YOUuHxgomU1uYJty",
"templateDataUrl": "",
"importURL": "https://tplshare.com/fhYJ3Mi",
"templateSource": "template_library",
"isPlainText": False,
"subjectLine": "Email Subject",
"fromName": "Name of sender",
"fromEmail": "test@abc.com",
"previewText": "preview text"
}
headers = {
"Version": "<version>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"redirect": "66e811229245fc098765590",
"traceId": "0c52e980-41f6-4be7-8c4b-e2c5a13dc3c2"
}{
"statusCode": 400,
"message": "Bad Request"
}{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}{
"statusCode": 422,
"message": [
"Unprocessable Entity"
],
"error": "Unprocessable Entity"
}