Fetch email templates by account id
http
GET https://services.leadconnectorhq.com/emails/builderAuthorization
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
Authorization | string | Yes | Bearer token generated from the Leadway portal. See Authentication. | |
Version | string | Yes | 2021-07-28 | API version. |
Query parameters
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
locationId | string | Yes | ve9EPM428h8vShlRW1KT | |
limit | string | No | ||
offset | string | No | ||
search | string | No | ||
sortByDate | string | No | ||
archived | string | No | ||
builderVersion | string | No | ||
name | string | No | ||
parentId | string | No | ||
originId | string | No | ve9EPM428h8vShlRW1KT | |
templatesOnly | string | No |
Responses
200 - Success
name(string): template name Example:New TemplateupdatedBy(string): updated by Example:John DoeisPlainText(boolean): plain text based template Example:falselastUpdated(string): last updated Example:2024-11-12T12:34:36.070ZdateAdded(string): date added Example:2024-11-12T12:34:36.070ZpreviewUrl(string): preview url Example:https://example.comid(string): id Example:67334b231f2fad724062f52b5version(string): version Example:1templateType(string): type Example:builder
json
{
"name": "New Template",
"updatedBy": "John Doe",
"isPlainText": "false",
"lastUpdated": "2024-11-12T12:34:36.070Z",
"dateAdded": "2024-11-12T12:34:36.070Z",
"previewUrl": "https://example.com",
"id": "67334b231f2fad724062f52b5",
"version": "1",
"templateType": "builder"
}400 - Bad Request
json
{}404 - Not Found
422 - Unprocessable Entity
json
{}Example
curl -X GET 'https://services.leadconnectorhq.com/emails/builder' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'const response = await fetch('https://services.leadconnectorhq.com/emails/builder', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/emails/builder',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()<?php
$ch = curl_init('https://services.leadconnectorhq.com/emails/builder');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);