Create a theme
curl --request POST \
--url https://app.loops.so/api/v1/themes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Dark mode",
"styles": {
"backgroundColor": "#111827",
"bodyColor": "#1f2937"
}
}
'import requests
url = "https://app.loops.so/api/v1/themes"
payload = {
"name": "Dark mode",
"styles": {
"backgroundColor": "#111827",
"bodyColor": "#1f2937"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Dark mode', styles: {backgroundColor: '#111827', bodyColor: '#1f2937'}})
};
fetch('https://app.loops.so/api/v1/themes', 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.loops.so/api/v1/themes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Dark mode',
'styles' => [
'backgroundColor' => '#111827',
'bodyColor' => '#1f2937'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.loops.so/api/v1/themes"
payload := strings.NewReader("{\n \"name\": \"Dark mode\",\n \"styles\": {\n \"backgroundColor\": \"#111827\",\n \"bodyColor\": \"#1f2937\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.loops.so/api/v1/themes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Dark mode\",\n \"styles\": {\n \"backgroundColor\": \"#111827\",\n \"bodyColor\": \"#1f2937\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.loops.so/api/v1/themes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Dark mode\",\n \"styles\": {\n \"backgroundColor\": \"#111827\",\n \"bodyColor\": \"#1f2937\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "clt3u5v7w9x1y3z5a7b9c1d3",
"name": "Default",
"styles": {
"backgroundColor": "#f5f5f5",
"backgroundXPadding": 24,
"backgroundYPadding": 24,
"bodyColor": "#ffffff",
"bodyXPadding": 24,
"bodyYPadding": 24,
"bodyFontFamily": "Helvetica",
"bodyFontCategory": "sans-serif",
"borderColor": "#e5e5e5",
"borderWidth": 1,
"borderRadius": 8,
"buttonBodyColor": "#111827",
"buttonBodyXPadding": 16,
"buttonBodyYPadding": 12,
"buttonBorderColor": "#111827",
"buttonBorderWidth": 0,
"buttonBorderRadius": 6,
"buttonTextColor": "#ffffff",
"buttonTextFormat": 0,
"buttonTextFontSize": 16,
"dividerColor": "#e5e5e5",
"dividerBorderWidth": 1,
"textBaseColor": "#374151",
"textBaseFontSize": 16,
"textBaseLineHeight": 24,
"textBaseLetterSpacing": 0,
"textLinkColor": "#2563eb",
"heading1Color": "#111827",
"heading1FontSize": 28,
"heading1LineHeight": 36,
"heading1LetterSpacing": -0.5,
"heading2Color": "#111827",
"heading2FontSize": 22,
"heading2LineHeight": 30,
"heading2LetterSpacing": -0.25,
"heading3Color": "#111827",
"heading3FontSize": 18,
"heading3LineHeight": 26,
"heading3LetterSpacing": 0
},
"isDefault": true,
"createdAt": "2025-06-29T07:47:39.370Z",
"updatedAt": "2025-06-29T07:47:39.370Z"
}{
"message": "Theme not found."
}Themes
Create a theme
Create a new email theme for use across Loops emails.
POST
/
v1
/
themes
Create a theme
curl --request POST \
--url https://app.loops.so/api/v1/themes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Dark mode",
"styles": {
"backgroundColor": "#111827",
"bodyColor": "#1f2937"
}
}
'import requests
url = "https://app.loops.so/api/v1/themes"
payload = {
"name": "Dark mode",
"styles": {
"backgroundColor": "#111827",
"bodyColor": "#1f2937"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Dark mode', styles: {backgroundColor: '#111827', bodyColor: '#1f2937'}})
};
fetch('https://app.loops.so/api/v1/themes', 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.loops.so/api/v1/themes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Dark mode',
'styles' => [
'backgroundColor' => '#111827',
'bodyColor' => '#1f2937'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.loops.so/api/v1/themes"
payload := strings.NewReader("{\n \"name\": \"Dark mode\",\n \"styles\": {\n \"backgroundColor\": \"#111827\",\n \"bodyColor\": \"#1f2937\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.loops.so/api/v1/themes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Dark mode\",\n \"styles\": {\n \"backgroundColor\": \"#111827\",\n \"bodyColor\": \"#1f2937\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.loops.so/api/v1/themes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Dark mode\",\n \"styles\": {\n \"backgroundColor\": \"#111827\",\n \"bodyColor\": \"#1f2937\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "clt3u5v7w9x1y3z5a7b9c1d3",
"name": "Default",
"styles": {
"backgroundColor": "#f5f5f5",
"backgroundXPadding": 24,
"backgroundYPadding": 24,
"bodyColor": "#ffffff",
"bodyXPadding": 24,
"bodyYPadding": 24,
"bodyFontFamily": "Helvetica",
"bodyFontCategory": "sans-serif",
"borderColor": "#e5e5e5",
"borderWidth": 1,
"borderRadius": 8,
"buttonBodyColor": "#111827",
"buttonBodyXPadding": 16,
"buttonBodyYPadding": 12,
"buttonBorderColor": "#111827",
"buttonBorderWidth": 0,
"buttonBorderRadius": 6,
"buttonTextColor": "#ffffff",
"buttonTextFormat": 0,
"buttonTextFontSize": 16,
"dividerColor": "#e5e5e5",
"dividerBorderWidth": 1,
"textBaseColor": "#374151",
"textBaseFontSize": 16,
"textBaseLineHeight": 24,
"textBaseLetterSpacing": 0,
"textLinkColor": "#2563eb",
"heading1Color": "#111827",
"heading1FontSize": 28,
"heading1LineHeight": 36,
"heading1LetterSpacing": -0.5,
"heading2Color": "#111827",
"heading2FontSize": 22,
"heading2LineHeight": 30,
"heading2LetterSpacing": -0.25,
"heading3Color": "#111827",
"heading3FontSize": 18,
"heading3LineHeight": 26,
"heading3LetterSpacing": 0
},
"isDefault": true,
"createdAt": "2025-06-29T07:47:39.370Z",
"updatedAt": "2025-06-29T07:47:39.370Z"
}{
"message": "Theme not found."
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
Theme created.
The ID of the theme.
Example:
"clt3u5v7w9x1y3z5a7b9c1d3"
The name of the theme.
Example:
"Default"
Flat map of style attributes, matching the attribute names accepted by the LMX <Style /> tag.
Show child attributes
Show child attributes
Whether this theme is the team's default.
Example:
true
ISO 8601 timestamp for when the theme was created.
Example:
"2025-06-29T07:47:39.370Z"
ISO 8601 timestamp for when the theme was last updated.
Example:
"2025-06-29T07:47:39.370Z"
Last modified on July 20, 2026
Was this page helpful?
⌘I

