List Folders
curl --request GET \
--url https://app.lettr.com/api/folders \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.lettr.com/api/folders"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.lettr.com/api/folders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.lettr.com/api/folders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.lettr.com/api/folders"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.lettr.com/api/folders")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.lettr.com/api/folders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "Folders retrieved successfully.",
"data": {
"folders": [
{
"id": 10,
"name": "Emails",
"project_id": 5,
"purpose": "transactional",
"templates_count": 8,
"created_at": "2025-01-15T10:00:00+00:00",
"updated_at": "2025-01-20T14:30:00+00:00"
},
{
"id": 11,
"name": "Campaigns",
"project_id": 5,
"purpose": "campaign",
"templates_count": 12,
"created_at": "2025-01-15T10:00:00+00:00",
"updated_at": "2025-02-02T09:12:00+00:00"
}
],
"pagination": {
"total": 2,
"per_page": 25,
"current_page": 1,
"last_page": 1
}
}
}Templates
List Folders
Retrieve a paginated list of the folders in a project, so a template can be filed into the right one.
Folder IDs are what folder_id on POST /templates expects. Folders belong to a module: a transactional folder holds the templates you send single emails with, a campaign folder holds the ones the campaign builder can pick. A template’s folder must belong to the same module as its purpose.
GET
/
folders
List Folders
curl --request GET \
--url https://app.lettr.com/api/folders \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.lettr.com/api/folders"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.lettr.com/api/folders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.lettr.com/api/folders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.lettr.com/api/folders"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.lettr.com/api/folders")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.lettr.com/api/folders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "Folders retrieved successfully.",
"data": {
"folders": [
{
"id": 10,
"name": "Emails",
"project_id": 5,
"purpose": "transactional",
"templates_count": 8,
"created_at": "2025-01-15T10:00:00+00:00",
"updated_at": "2025-01-20T14:30:00+00:00"
},
{
"id": 11,
"name": "Campaigns",
"project_id": 5,
"purpose": "campaign",
"templates_count": 12,
"created_at": "2025-01-15T10:00:00+00:00",
"updated_at": "2025-02-02T09:12:00+00:00"
}
],
"pagination": {
"total": 2,
"per_page": 25,
"current_page": 1,
"last_page": 1
}
}
}Lists the folders templates are filed into, with each folder’s mode and how many templates it holds.
This is the only endpoint that returns folder IDs. Without it,
A template’s
folder_id on Create Template can only be omitted — letting the API pick a folder — or guessed from an integer read out of an app URL.
Modes
Folders are mode-scoped, matching the transactional / marketing split. Filter withpurpose to get just one side:
curl "https://app.lettr.com/api/folders?purpose=campaign" \
-H "Authorization: Bearer $LETTR_API_KEY"
folder_id must name a folder of the same mode as its purpose. Create Template rejects a folder of the other mode with 422, and when you leave folder_id out, the template goes to the main folder of its mode.
You can also pass folder_id to List Templates to list only the templates in one folder.
Read-only
Folders are created and managed in the app. There is no API to create, rename or delete one, because deleting a folder moves or deletes the templates inside it.Authorizations
API key for authentication
Query Parameters
Project ID to retrieve folders from. If not provided, uses the team's default project.
Required range:
x >= 1Return only the folders of one module. If not provided, folders of both modules are returned.
Available options:
transactional, campaign Example:
"campaign"
Number of results per page (1-100)
Required range:
1 <= x <= 100Page number
Required range:
x >= 1Was this page helpful?