Update a theme
curl --request POST \
--url https://app.loops.so/api/v1/themes/{themeId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"styles": {
"backgroundColor": "<string>",
"backgroundXPadding": 123,
"backgroundYPadding": 123,
"bodyColor": "<string>",
"bodyXPadding": 123,
"bodyYPadding": 123,
"bodyFontFamily": "<string>",
"bodyFontCategory": "<string>",
"borderColor": "<string>",
"borderWidth": 123,
"borderRadius": 123,
"buttonBodyColor": "<string>",
"buttonBodyXPadding": 123,
"buttonBodyYPadding": 123,
"buttonBorderColor": "<string>",
"buttonBorderWidth": 123,
"buttonBorderRadius": 123,
"buttonTextColor": "<string>",
"buttonTextFormat": 123,
"buttonTextFontSize": 123,
"dividerColor": "<string>",
"dividerBorderWidth": 123,
"textBaseColor": "<string>",
"textBaseFontSize": 123,
"textBaseLineHeight": 123,
"textBaseLetterSpacing": 123,
"textLinkColor": "<string>",
"heading1Color": "<string>",
"heading1FontSize": 123,
"heading1LineHeight": 123,
"heading1LetterSpacing": 123,
"heading2Color": "<string>",
"heading2FontSize": 123,
"heading2LineHeight": 123,
"heading2LetterSpacing": 123,
"heading3Color": "<string>",
"heading3FontSize": 123,
"heading3LineHeight": 123,
"heading3LetterSpacing": 123
}
}
'import requests
url = "https://app.loops.so/api/v1/themes/{themeId}"
payload = {
"name": "<string>",
"styles": {
"backgroundColor": "<string>",
"backgroundXPadding": 123,
"backgroundYPadding": 123,
"bodyColor": "<string>",
"bodyXPadding": 123,
"bodyYPadding": 123,
"bodyFontFamily": "<string>",
"bodyFontCategory": "<string>",
"borderColor": "<string>",
"borderWidth": 123,
"borderRadius": 123,
"buttonBodyColor": "<string>",
"buttonBodyXPadding": 123,
"buttonBodyYPadding": 123,
"buttonBorderColor": "<string>",
"buttonBorderWidth": 123,
"buttonBorderRadius": 123,
"buttonTextColor": "<string>",
"buttonTextFormat": 123,
"buttonTextFontSize": 123,
"dividerColor": "<string>",
"dividerBorderWidth": 123,
"textBaseColor": "<string>",
"textBaseFontSize": 123,
"textBaseLineHeight": 123,
"textBaseLetterSpacing": 123,
"textLinkColor": "<string>",
"heading1Color": "<string>",
"heading1FontSize": 123,
"heading1LineHeight": 123,
"heading1LetterSpacing": 123,
"heading2Color": "<string>",
"heading2FontSize": 123,
"heading2LineHeight": 123,
"heading2LetterSpacing": 123,
"heading3Color": "<string>",
"heading3FontSize": 123,
"heading3LineHeight": 123,
"heading3LetterSpacing": 123
}
}
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: '<string>',
styles: {
backgroundColor: '<string>',
backgroundXPadding: 123,
backgroundYPadding: 123,
bodyColor: '<string>',
bodyXPadding: 123,
bodyYPadding: 123,
bodyFontFamily: '<string>',
bodyFontCategory: '<string>',
borderColor: '<string>',
borderWidth: 123,
borderRadius: 123,
buttonBodyColor: '<string>',
buttonBodyXPadding: 123,
buttonBodyYPadding: 123,
buttonBorderColor: '<string>',
buttonBorderWidth: 123,
buttonBorderRadius: 123,
buttonTextColor: '<string>',
buttonTextFormat: 123,
buttonTextFontSize: 123,
dividerColor: '<string>',
dividerBorderWidth: 123,
textBaseColor: '<string>',
textBaseFontSize: 123,
textBaseLineHeight: 123,
textBaseLetterSpacing: 123,
textLinkColor: '<string>',
heading1Color: '<string>',
heading1FontSize: 123,
heading1LineHeight: 123,
heading1LetterSpacing: 123,
heading2Color: '<string>',
heading2FontSize: 123,
heading2LineHeight: 123,
heading2LetterSpacing: 123,
heading3Color: '<string>',
heading3FontSize: 123,
heading3LineHeight: 123,
heading3LetterSpacing: 123
}
})
};
fetch('https://app.loops.so/api/v1/themes/{themeId}', 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/{themeId}",
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' => '<string>',
'styles' => [
'backgroundColor' => '<string>',
'backgroundXPadding' => 123,
'backgroundYPadding' => 123,
'bodyColor' => '<string>',
'bodyXPadding' => 123,
'bodyYPadding' => 123,
'bodyFontFamily' => '<string>',
'bodyFontCategory' => '<string>',
'borderColor' => '<string>',
'borderWidth' => 123,
'borderRadius' => 123,
'buttonBodyColor' => '<string>',
'buttonBodyXPadding' => 123,
'buttonBodyYPadding' => 123,
'buttonBorderColor' => '<string>',
'buttonBorderWidth' => 123,
'buttonBorderRadius' => 123,
'buttonTextColor' => '<string>',
'buttonTextFormat' => 123,
'buttonTextFontSize' => 123,
'dividerColor' => '<string>',
'dividerBorderWidth' => 123,
'textBaseColor' => '<string>',
'textBaseFontSize' => 123,
'textBaseLineHeight' => 123,
'textBaseLetterSpacing' => 123,
'textLinkColor' => '<string>',
'heading1Color' => '<string>',
'heading1FontSize' => 123,
'heading1LineHeight' => 123,
'heading1LetterSpacing' => 123,
'heading2Color' => '<string>',
'heading2FontSize' => 123,
'heading2LineHeight' => 123,
'heading2LetterSpacing' => 123,
'heading3Color' => '<string>',
'heading3FontSize' => 123,
'heading3LineHeight' => 123,
'heading3LetterSpacing' => 123
]
]),
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/{themeId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"styles\": {\n \"backgroundColor\": \"<string>\",\n \"backgroundXPadding\": 123,\n \"backgroundYPadding\": 123,\n \"bodyColor\": \"<string>\",\n \"bodyXPadding\": 123,\n \"bodyYPadding\": 123,\n \"bodyFontFamily\": \"<string>\",\n \"bodyFontCategory\": \"<string>\",\n \"borderColor\": \"<string>\",\n \"borderWidth\": 123,\n \"borderRadius\": 123,\n \"buttonBodyColor\": \"<string>\",\n \"buttonBodyXPadding\": 123,\n \"buttonBodyYPadding\": 123,\n \"buttonBorderColor\": \"<string>\",\n \"buttonBorderWidth\": 123,\n \"buttonBorderRadius\": 123,\n \"buttonTextColor\": \"<string>\",\n \"buttonTextFormat\": 123,\n \"buttonTextFontSize\": 123,\n \"dividerColor\": \"<string>\",\n \"dividerBorderWidth\": 123,\n \"textBaseColor\": \"<string>\",\n \"textBaseFontSize\": 123,\n \"textBaseLineHeight\": 123,\n \"textBaseLetterSpacing\": 123,\n \"textLinkColor\": \"<string>\",\n \"heading1Color\": \"<string>\",\n \"heading1FontSize\": 123,\n \"heading1LineHeight\": 123,\n \"heading1LetterSpacing\": 123,\n \"heading2Color\": \"<string>\",\n \"heading2FontSize\": 123,\n \"heading2LineHeight\": 123,\n \"heading2LetterSpacing\": 123,\n \"heading3Color\": \"<string>\",\n \"heading3FontSize\": 123,\n \"heading3LineHeight\": 123,\n \"heading3LetterSpacing\": 123\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/{themeId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"styles\": {\n \"backgroundColor\": \"<string>\",\n \"backgroundXPadding\": 123,\n \"backgroundYPadding\": 123,\n \"bodyColor\": \"<string>\",\n \"bodyXPadding\": 123,\n \"bodyYPadding\": 123,\n \"bodyFontFamily\": \"<string>\",\n \"bodyFontCategory\": \"<string>\",\n \"borderColor\": \"<string>\",\n \"borderWidth\": 123,\n \"borderRadius\": 123,\n \"buttonBodyColor\": \"<string>\",\n \"buttonBodyXPadding\": 123,\n \"buttonBodyYPadding\": 123,\n \"buttonBorderColor\": \"<string>\",\n \"buttonBorderWidth\": 123,\n \"buttonBorderRadius\": 123,\n \"buttonTextColor\": \"<string>\",\n \"buttonTextFormat\": 123,\n \"buttonTextFontSize\": 123,\n \"dividerColor\": \"<string>\",\n \"dividerBorderWidth\": 123,\n \"textBaseColor\": \"<string>\",\n \"textBaseFontSize\": 123,\n \"textBaseLineHeight\": 123,\n \"textBaseLetterSpacing\": 123,\n \"textLinkColor\": \"<string>\",\n \"heading1Color\": \"<string>\",\n \"heading1FontSize\": 123,\n \"heading1LineHeight\": 123,\n \"heading1LetterSpacing\": 123,\n \"heading2Color\": \"<string>\",\n \"heading2FontSize\": 123,\n \"heading2LineHeight\": 123,\n \"heading2LetterSpacing\": 123,\n \"heading3Color\": \"<string>\",\n \"heading3FontSize\": 123,\n \"heading3LineHeight\": 123,\n \"heading3LetterSpacing\": 123\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.loops.so/api/v1/themes/{themeId}")
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\": \"<string>\",\n \"styles\": {\n \"backgroundColor\": \"<string>\",\n \"backgroundXPadding\": 123,\n \"backgroundYPadding\": 123,\n \"bodyColor\": \"<string>\",\n \"bodyXPadding\": 123,\n \"bodyYPadding\": 123,\n \"bodyFontFamily\": \"<string>\",\n \"bodyFontCategory\": \"<string>\",\n \"borderColor\": \"<string>\",\n \"borderWidth\": 123,\n \"borderRadius\": 123,\n \"buttonBodyColor\": \"<string>\",\n \"buttonBodyXPadding\": 123,\n \"buttonBodyYPadding\": 123,\n \"buttonBorderColor\": \"<string>\",\n \"buttonBorderWidth\": 123,\n \"buttonBorderRadius\": 123,\n \"buttonTextColor\": \"<string>\",\n \"buttonTextFormat\": 123,\n \"buttonTextFontSize\": 123,\n \"dividerColor\": \"<string>\",\n \"dividerBorderWidth\": 123,\n \"textBaseColor\": \"<string>\",\n \"textBaseFontSize\": 123,\n \"textBaseLineHeight\": 123,\n \"textBaseLetterSpacing\": 123,\n \"textLinkColor\": \"<string>\",\n \"heading1Color\": \"<string>\",\n \"heading1FontSize\": 123,\n \"heading1LineHeight\": 123,\n \"heading1LetterSpacing\": 123,\n \"heading2Color\": \"<string>\",\n \"heading2FontSize\": 123,\n \"heading2LineHeight\": 123,\n \"heading2LetterSpacing\": 123,\n \"heading3Color\": \"<string>\",\n \"heading3FontSize\": 123,\n \"heading3LineHeight\": 123,\n \"heading3LetterSpacing\": 123\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"styles": {
"backgroundColor": "<string>",
"backgroundXPadding": 123,
"backgroundYPadding": 123,
"bodyColor": "<string>",
"bodyXPadding": 123,
"bodyYPadding": 123,
"bodyFontFamily": "<string>",
"bodyFontCategory": "<string>",
"borderColor": "<string>",
"borderWidth": 123,
"borderRadius": 123,
"buttonBodyColor": "<string>",
"buttonBodyXPadding": 123,
"buttonBodyYPadding": 123,
"buttonBorderColor": "<string>",
"buttonBorderWidth": 123,
"buttonBorderRadius": 123,
"buttonTextColor": "<string>",
"buttonTextFormat": 123,
"buttonTextFontSize": 123,
"dividerColor": "<string>",
"dividerBorderWidth": 123,
"textBaseColor": "<string>",
"textBaseFontSize": 123,
"textBaseLineHeight": 123,
"textBaseLetterSpacing": 123,
"textLinkColor": "<string>",
"heading1Color": "<string>",
"heading1FontSize": 123,
"heading1LineHeight": 123,
"heading1LetterSpacing": 123,
"heading2Color": "<string>",
"heading2FontSize": 123,
"heading2LineHeight": 123,
"heading2LetterSpacing": 123,
"heading3Color": "<string>",
"heading3FontSize": 123,
"heading3LineHeight": 123,
"heading3LetterSpacing": 123
},
"isDefault": true,
"createdAt": "<string>",
"updatedAt": "<string>",
"affectedEmailCount": 123
}{
"message": "<string>"
}{
"message": "<string>"
}Themes
Update a theme
Update a theme’s name and/or styles. Style changes cascade to every email using the theme.
POST
/
v1
/
themes
/
{themeId}
Update a theme
curl --request POST \
--url https://app.loops.so/api/v1/themes/{themeId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"styles": {
"backgroundColor": "<string>",
"backgroundXPadding": 123,
"backgroundYPadding": 123,
"bodyColor": "<string>",
"bodyXPadding": 123,
"bodyYPadding": 123,
"bodyFontFamily": "<string>",
"bodyFontCategory": "<string>",
"borderColor": "<string>",
"borderWidth": 123,
"borderRadius": 123,
"buttonBodyColor": "<string>",
"buttonBodyXPadding": 123,
"buttonBodyYPadding": 123,
"buttonBorderColor": "<string>",
"buttonBorderWidth": 123,
"buttonBorderRadius": 123,
"buttonTextColor": "<string>",
"buttonTextFormat": 123,
"buttonTextFontSize": 123,
"dividerColor": "<string>",
"dividerBorderWidth": 123,
"textBaseColor": "<string>",
"textBaseFontSize": 123,
"textBaseLineHeight": 123,
"textBaseLetterSpacing": 123,
"textLinkColor": "<string>",
"heading1Color": "<string>",
"heading1FontSize": 123,
"heading1LineHeight": 123,
"heading1LetterSpacing": 123,
"heading2Color": "<string>",
"heading2FontSize": 123,
"heading2LineHeight": 123,
"heading2LetterSpacing": 123,
"heading3Color": "<string>",
"heading3FontSize": 123,
"heading3LineHeight": 123,
"heading3LetterSpacing": 123
}
}
'import requests
url = "https://app.loops.so/api/v1/themes/{themeId}"
payload = {
"name": "<string>",
"styles": {
"backgroundColor": "<string>",
"backgroundXPadding": 123,
"backgroundYPadding": 123,
"bodyColor": "<string>",
"bodyXPadding": 123,
"bodyYPadding": 123,
"bodyFontFamily": "<string>",
"bodyFontCategory": "<string>",
"borderColor": "<string>",
"borderWidth": 123,
"borderRadius": 123,
"buttonBodyColor": "<string>",
"buttonBodyXPadding": 123,
"buttonBodyYPadding": 123,
"buttonBorderColor": "<string>",
"buttonBorderWidth": 123,
"buttonBorderRadius": 123,
"buttonTextColor": "<string>",
"buttonTextFormat": 123,
"buttonTextFontSize": 123,
"dividerColor": "<string>",
"dividerBorderWidth": 123,
"textBaseColor": "<string>",
"textBaseFontSize": 123,
"textBaseLineHeight": 123,
"textBaseLetterSpacing": 123,
"textLinkColor": "<string>",
"heading1Color": "<string>",
"heading1FontSize": 123,
"heading1LineHeight": 123,
"heading1LetterSpacing": 123,
"heading2Color": "<string>",
"heading2FontSize": 123,
"heading2LineHeight": 123,
"heading2LetterSpacing": 123,
"heading3Color": "<string>",
"heading3FontSize": 123,
"heading3LineHeight": 123,
"heading3LetterSpacing": 123
}
}
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: '<string>',
styles: {
backgroundColor: '<string>',
backgroundXPadding: 123,
backgroundYPadding: 123,
bodyColor: '<string>',
bodyXPadding: 123,
bodyYPadding: 123,
bodyFontFamily: '<string>',
bodyFontCategory: '<string>',
borderColor: '<string>',
borderWidth: 123,
borderRadius: 123,
buttonBodyColor: '<string>',
buttonBodyXPadding: 123,
buttonBodyYPadding: 123,
buttonBorderColor: '<string>',
buttonBorderWidth: 123,
buttonBorderRadius: 123,
buttonTextColor: '<string>',
buttonTextFormat: 123,
buttonTextFontSize: 123,
dividerColor: '<string>',
dividerBorderWidth: 123,
textBaseColor: '<string>',
textBaseFontSize: 123,
textBaseLineHeight: 123,
textBaseLetterSpacing: 123,
textLinkColor: '<string>',
heading1Color: '<string>',
heading1FontSize: 123,
heading1LineHeight: 123,
heading1LetterSpacing: 123,
heading2Color: '<string>',
heading2FontSize: 123,
heading2LineHeight: 123,
heading2LetterSpacing: 123,
heading3Color: '<string>',
heading3FontSize: 123,
heading3LineHeight: 123,
heading3LetterSpacing: 123
}
})
};
fetch('https://app.loops.so/api/v1/themes/{themeId}', 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/{themeId}",
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' => '<string>',
'styles' => [
'backgroundColor' => '<string>',
'backgroundXPadding' => 123,
'backgroundYPadding' => 123,
'bodyColor' => '<string>',
'bodyXPadding' => 123,
'bodyYPadding' => 123,
'bodyFontFamily' => '<string>',
'bodyFontCategory' => '<string>',
'borderColor' => '<string>',
'borderWidth' => 123,
'borderRadius' => 123,
'buttonBodyColor' => '<string>',
'buttonBodyXPadding' => 123,
'buttonBodyYPadding' => 123,
'buttonBorderColor' => '<string>',
'buttonBorderWidth' => 123,
'buttonBorderRadius' => 123,
'buttonTextColor' => '<string>',
'buttonTextFormat' => 123,
'buttonTextFontSize' => 123,
'dividerColor' => '<string>',
'dividerBorderWidth' => 123,
'textBaseColor' => '<string>',
'textBaseFontSize' => 123,
'textBaseLineHeight' => 123,
'textBaseLetterSpacing' => 123,
'textLinkColor' => '<string>',
'heading1Color' => '<string>',
'heading1FontSize' => 123,
'heading1LineHeight' => 123,
'heading1LetterSpacing' => 123,
'heading2Color' => '<string>',
'heading2FontSize' => 123,
'heading2LineHeight' => 123,
'heading2LetterSpacing' => 123,
'heading3Color' => '<string>',
'heading3FontSize' => 123,
'heading3LineHeight' => 123,
'heading3LetterSpacing' => 123
]
]),
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/{themeId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"styles\": {\n \"backgroundColor\": \"<string>\",\n \"backgroundXPadding\": 123,\n \"backgroundYPadding\": 123,\n \"bodyColor\": \"<string>\",\n \"bodyXPadding\": 123,\n \"bodyYPadding\": 123,\n \"bodyFontFamily\": \"<string>\",\n \"bodyFontCategory\": \"<string>\",\n \"borderColor\": \"<string>\",\n \"borderWidth\": 123,\n \"borderRadius\": 123,\n \"buttonBodyColor\": \"<string>\",\n \"buttonBodyXPadding\": 123,\n \"buttonBodyYPadding\": 123,\n \"buttonBorderColor\": \"<string>\",\n \"buttonBorderWidth\": 123,\n \"buttonBorderRadius\": 123,\n \"buttonTextColor\": \"<string>\",\n \"buttonTextFormat\": 123,\n \"buttonTextFontSize\": 123,\n \"dividerColor\": \"<string>\",\n \"dividerBorderWidth\": 123,\n \"textBaseColor\": \"<string>\",\n \"textBaseFontSize\": 123,\n \"textBaseLineHeight\": 123,\n \"textBaseLetterSpacing\": 123,\n \"textLinkColor\": \"<string>\",\n \"heading1Color\": \"<string>\",\n \"heading1FontSize\": 123,\n \"heading1LineHeight\": 123,\n \"heading1LetterSpacing\": 123,\n \"heading2Color\": \"<string>\",\n \"heading2FontSize\": 123,\n \"heading2LineHeight\": 123,\n \"heading2LetterSpacing\": 123,\n \"heading3Color\": \"<string>\",\n \"heading3FontSize\": 123,\n \"heading3LineHeight\": 123,\n \"heading3LetterSpacing\": 123\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/{themeId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"styles\": {\n \"backgroundColor\": \"<string>\",\n \"backgroundXPadding\": 123,\n \"backgroundYPadding\": 123,\n \"bodyColor\": \"<string>\",\n \"bodyXPadding\": 123,\n \"bodyYPadding\": 123,\n \"bodyFontFamily\": \"<string>\",\n \"bodyFontCategory\": \"<string>\",\n \"borderColor\": \"<string>\",\n \"borderWidth\": 123,\n \"borderRadius\": 123,\n \"buttonBodyColor\": \"<string>\",\n \"buttonBodyXPadding\": 123,\n \"buttonBodyYPadding\": 123,\n \"buttonBorderColor\": \"<string>\",\n \"buttonBorderWidth\": 123,\n \"buttonBorderRadius\": 123,\n \"buttonTextColor\": \"<string>\",\n \"buttonTextFormat\": 123,\n \"buttonTextFontSize\": 123,\n \"dividerColor\": \"<string>\",\n \"dividerBorderWidth\": 123,\n \"textBaseColor\": \"<string>\",\n \"textBaseFontSize\": 123,\n \"textBaseLineHeight\": 123,\n \"textBaseLetterSpacing\": 123,\n \"textLinkColor\": \"<string>\",\n \"heading1Color\": \"<string>\",\n \"heading1FontSize\": 123,\n \"heading1LineHeight\": 123,\n \"heading1LetterSpacing\": 123,\n \"heading2Color\": \"<string>\",\n \"heading2FontSize\": 123,\n \"heading2LineHeight\": 123,\n \"heading2LetterSpacing\": 123,\n \"heading3Color\": \"<string>\",\n \"heading3FontSize\": 123,\n \"heading3LineHeight\": 123,\n \"heading3LetterSpacing\": 123\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.loops.so/api/v1/themes/{themeId}")
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\": \"<string>\",\n \"styles\": {\n \"backgroundColor\": \"<string>\",\n \"backgroundXPadding\": 123,\n \"backgroundYPadding\": 123,\n \"bodyColor\": \"<string>\",\n \"bodyXPadding\": 123,\n \"bodyYPadding\": 123,\n \"bodyFontFamily\": \"<string>\",\n \"bodyFontCategory\": \"<string>\",\n \"borderColor\": \"<string>\",\n \"borderWidth\": 123,\n \"borderRadius\": 123,\n \"buttonBodyColor\": \"<string>\",\n \"buttonBodyXPadding\": 123,\n \"buttonBodyYPadding\": 123,\n \"buttonBorderColor\": \"<string>\",\n \"buttonBorderWidth\": 123,\n \"buttonBorderRadius\": 123,\n \"buttonTextColor\": \"<string>\",\n \"buttonTextFormat\": 123,\n \"buttonTextFontSize\": 123,\n \"dividerColor\": \"<string>\",\n \"dividerBorderWidth\": 123,\n \"textBaseColor\": \"<string>\",\n \"textBaseFontSize\": 123,\n \"textBaseLineHeight\": 123,\n \"textBaseLetterSpacing\": 123,\n \"textLinkColor\": \"<string>\",\n \"heading1Color\": \"<string>\",\n \"heading1FontSize\": 123,\n \"heading1LineHeight\": 123,\n \"heading1LetterSpacing\": 123,\n \"heading2Color\": \"<string>\",\n \"heading2FontSize\": 123,\n \"heading2LineHeight\": 123,\n \"heading2LetterSpacing\": 123,\n \"heading3Color\": \"<string>\",\n \"heading3FontSize\": 123,\n \"heading3LineHeight\": 123,\n \"heading3LetterSpacing\": 123\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"styles": {
"backgroundColor": "<string>",
"backgroundXPadding": 123,
"backgroundYPadding": 123,
"bodyColor": "<string>",
"bodyXPadding": 123,
"bodyYPadding": 123,
"bodyFontFamily": "<string>",
"bodyFontCategory": "<string>",
"borderColor": "<string>",
"borderWidth": 123,
"borderRadius": 123,
"buttonBodyColor": "<string>",
"buttonBodyXPadding": 123,
"buttonBodyYPadding": 123,
"buttonBorderColor": "<string>",
"buttonBorderWidth": 123,
"buttonBorderRadius": 123,
"buttonTextColor": "<string>",
"buttonTextFormat": 123,
"buttonTextFontSize": 123,
"dividerColor": "<string>",
"dividerBorderWidth": 123,
"textBaseColor": "<string>",
"textBaseFontSize": 123,
"textBaseLineHeight": 123,
"textBaseLetterSpacing": 123,
"textLinkColor": "<string>",
"heading1Color": "<string>",
"heading1FontSize": 123,
"heading1LineHeight": 123,
"heading1LetterSpacing": 123,
"heading2Color": "<string>",
"heading2FontSize": 123,
"heading2LineHeight": 123,
"heading2LetterSpacing": 123,
"heading3Color": "<string>",
"heading3FontSize": 123,
"heading3LineHeight": 123,
"heading3LetterSpacing": 123
},
"isDefault": true,
"createdAt": "<string>",
"updatedAt": "<string>",
"affectedEmailCount": 123
}{
"message": "<string>"
}{
"message": "<string>"
}When
styles change, the update cascades to every email using this theme, and affectedEmailCount in the response reports how many emails were affected.
Manual style edits made on individual emails are preserved: the cascade only changes properties an email has not overridden. A per-email override is removed only when it becomes identical to the theme’s new value, after which that email follows the theme for that property.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The ID of the theme.
Body
application/json
Response
Successful.
The ID of the theme.
The name of the theme.
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.
ISO 8601 timestamp for when the theme was created.
ISO 8601 timestamp for when the theme was last updated.
The number of emails using this theme that are affected by the style change. 0 when only the name changed.
Last modified on July 20, 2026
Was this page helpful?
⌘I

